mIRC Homepage

Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz))

Posted By: KindOne

Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 24/07/21 04:33 AM

GMT is off by one hour in every version after 7.55, this is wrong. My timezone is currently in Eastern Daylight Time (GMT-4).

[7.55] 00:12:06 -0400 GMT
[7.56] 00:12:06 -0500 GMT
Posted By: Raccoon

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 24/07/21 12:30 PM

Do you get the same value for $ctime in both versions, or conflicting values?
Posted By: KindOne

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 24/07/21 05:56 PM

Same $ctime value in 7.02 - 7.66 in my testing.

$ctime - $asctime($ctime,HH:nn:ss zzz)


[7.55] 1627148519 - 13:41:59 -0400 GMT
[7.56] 1627148519 - 13:41:59 -0500 GMT
Posted By: Raccoon

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 25/07/21 12:56 PM

Look like another DST daylight savings time bug, then. I bet it goes away in November.


Please tell me the values of $gmt do not match. If they do match it would be a weird DST bug.
Posted By: KindOne

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 27/07/21 02:02 AM

Greeting from the future! Looks like a DST bug.


//echo -ag $version $adate $ctime - $asctime($ctime,HH:nn:ss zzz)

7.55 12/31/2021 1641005909 - 21:58:29 -0500 GMT
7.56 12/31/2021 1641005909 - 21:58:29 -0500 GMT
7.66 12/31/2021 1641005909 - 21:58:29 -0500 GMT
Posted By: ekcdd

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 27/07/21 06:51 AM

I wonder if this is related to the DST bug that occurred for me a few months back for me. Khaled was unable to reproduce it.
Posted By: Khaled

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 28/07/21 05:26 PM

Thanks for your bug report. The time features in v7.56 were updated to 1) use the Windows time APIs and 2) fix issues in v7.55 where it was not reporting correct values in some contexts.

That said, these changes were tested at the time, so I am not sure why the DST issue has appeared again. I remember that when v7.56 was being worked on, both I and others on the forums, tested it in different timezones and times of year, and it was returning the correct values.

I am going to make a change in the next beta and will test again in different timezones and times of year.

However, it will need further beta testing to confirm that it is resolved.
Posted By: maroon

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 29/07/21 12:39 PM

The testing I did back then was done in thread https://forums.mirc.com/ubbthreads.php/topics/265145/gmt-number where I was looking at the time-of-day being correct, and I did not test zzz at all.

That thread included https://forums.mirc.com/ubbthreads.php/topics/265267/re-gmt-number#Post265267 where Khaled mentioned fixing a DST bug related to zzz but didn't describe what that problem had been. Perhaps that fix had gotten reverted later in the thread when the TimeAPI changed.
Posted By: KindOne

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 02/10/21 02:45 AM

Looks fixed to me in 7.66.219

I changed the clock and ran the command.

//echo -ag $asctime(yyyy/mm/dd HH:nn:ss zzz)

2021/10/01 22:38:41 -0400 GMT
2021/11/01 22:38:53 -0400 GMT
2021/11/07 22:39:01 -0500 GMT (Nov 7, 2021 - Daylight Saving Time Ends)
2021/12/01 22:39:27 -0500 GMT
2022/01/01 22:39:35 -0500 GMT
2022/02/01 22:39:42 -0500 GMT
2022/03/01 22:39:49 -0500 GMT
2022/03/12 22:39:56 -0500 GMT
2022/03/13 22:40:04 -0400 GMT (Mar 13, 2022 - Daylight Saving Time Starts)
Posted By: Khaled

Re: Getting wrong GMT - $asctime($ctime,HH:nn:ss zzz)) - 02/10/21 01:42 PM

Great, thanks for confirming.
© 2021 mIRC Discussion Forums