mIRC Homepage
Posted By: meiji in regards to timestamp problems - 25/02/04 03:25 PM
im not really sure what forum i should post this on seeings its not really a bug report, but i put it here because i figured more people would look here.

here's a little script to fix your timestamps in mirc. this is for anyone who's timestamps are currently not working thanks to day light savings and some mirc bug.

Code:
;********************************************************
;* 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 } }
}
Posted By: Jae Re: in regards to timestamp problems - 25/02/04 07:32 PM
I believe though that it doesnt change to daylightsavings as it might be confusing to whtever the logs being logged for.
[02:59] bleh.. when it isnt set back an hour yet..
[02:00] ...now after is set..
as this might cause problems for log parsers and such.. then there's missing an hour.. blush
None the less if this is the case then i do not see why a line isnt set as there are at midnight. ie at some random times. or in one copy of mirc it seems to set at midnight
Session Time: Tue Feb 24 23:00:00 2004
im sure there can be a essage something like.
Session Time: Tue Feb 24 02:00:00 2004 Daylight Savings

Also it may also be the case that if someoen scriped some sort of script using times something is done and all of a suddent its going back or has a huge gap in time. or even an event triggered at 02:00 would be triggered twice.

Cheers Col
Posted By: meiji Re: in regards to timestamp problems - 25/02/04 10:39 PM
hows it going to react when daylight savings normally comes in and out of effect ?.. log parsers you asume would have something worked out for daylight savings. also its not a total fix, but it changes timestamps which were bugging the crap outa me being 1 hour off.
Posted By: Watchdog Re: in regards to timestamp problems - 26/02/04 05:17 AM
Bring on the 31st March - then we won't have to worry about it. grin
Posted By: Jae Re: in regards to timestamp problems - 27/02/04 03:06 PM
And the antz go marching one y one...
Oh hang on.. wrong march..
Maybe mIRC can have a verion that puts the date to 31st of march and jsut colve all problems you say? laugh

Cheers Col
Posted By: Watchdog Re: in regards to timestamp problems - 27/02/04 10:00 PM
Personally, I don't believe in daylight saving - I think it's a waste of time and a curse on the body clock though I do believe that Khaled should have fixed the problem when it was identified. He's released a new version within one week of a previous version at one time to satisfy all those who hated the bold border styles introduced in V6.0 (I think) which is comparitivily trivial compared to being able to keep accurate logs, displays etc.
Posted By: landonsandor Re: in regards to timestamp problems - 28/02/04 03:21 AM
time to sidetrack this for a moment - amen, I HATE the whole EST/DST crap. I say change the clock by half an hour next time and jsut be DONE with it. As you say, would be much easier on the body clock. it's a shame we cant go to a 30 day month every month and simplify the rest of the calendar system (not to mention $duration LOL)
© mIRC Discussion Forums