;********************************************************
;* DLS Fixer v1.0 - by MEiJ <meij101@hotmail.com> *
;********************************************************
;* This script is for anyone having problems with there *
;* timestamps lagging 1 hour behind there actual clock *
;* time. the versions mirc affected with this daylight *
;* savings bug so far seem to be 6.1 -> 6.12 *
;********************************************************
on *:START: { if (!%dls.format) { set %dls.format $timestampfmt } | .timer(dls) -o 0 1 dls.updatet }
alias dls.strip { var %i | .echo -q $regsub($1-, /([a-z]*[A-Z]*[0-9]*)/g,,%i) | return %i }
alias dls.updatet {
:start
if (!%dls.format) { echo -st (DLS Fixer) Timer stopped, timestamp format not found. | .timer(dls) off }
var %dls = $calc($ctime + $daylight)
var %t = $replace($asctime(%dls,$replace(%dls.format,tt,aa)),aa,tt)
; This enables compatability with MTS/XTS themes etc.
; remove it or comment it out if it causes problems
if ($dls.strip($timestampfmt) != $dls.strip(%t)) { set %dls.format $timestampfmt | var %p 1 | goto start }
.timestamp -fe %t
if (%p) { echo -st (DLS Fixer) Detected new timestamp format, switching over. }
}
menu menubar,channel,status {
-
DLS Fixer
.format: { set %dls.format $$?="Timestamp Format" }
.$iif(!$timer((dls)),start,stop): { if ($timer((dls))) { .timer(dls) off } | else { .timer(dls) -o 0 1 dls.updatet } }
}