mIRC Home    About    Download    Register    News    Help

Print Thread
z format for $asctime/$gmt #264856 18/01/19 10:21 AM
Joined: Jan 2004
Posts: 1,178
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,178
z format doesn't show half hour for some timezones.

Not sure how many users this affects. I can't find past mention in the forum about the 'z' format of text time. For the vast majority of users, hours offset to GMT is an integer, so it makes sense for them if the 'z' format is simply a positive or negative integer.

//echo -a timezone $timezone z/zz/zzz: $asctime($ctime,z / zz / zzz)

I changed computer time to Newfoundland -0330 UTC zone to see what happened, and it showed the offset -3 as if the zone were -0300. Looking at Adelaide that's a half hour difference on the other side of GMT, as well as Kathmandu's +0545, it looks like the z format is showing as +- $int(zz format).

I'm not sure what locals in those zones would expect z to show, but I would think it would be something like -3.5 or -3.3 not just -3.

Re: z format for $asctime/$gmt [Re: maroon] #264859 18/01/19 01:10 PM
Joined: Dec 2002
Posts: 4,521
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,521
Thanks for your bug report. It's a simple fix but it does mean that the value returned for z could be N, N.25, N.5, N.75, or possibly any floating point value at all :-) This has been fixed for the next version.