mIRC Home    About    Download    Register    News    Help

Topic Options
#264856 - 18/01/19 10:21 AM z format for $asctime/$gmt
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1145
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.

#264859 - 18/01/19 01:10 PM Re: z format for $asctime/$gmt [Re: maroon]
Khaled Offline

Planetary brain

Registered: 04/12/02
Posts: 4440
Loc: London, UK
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.