rcdmk / aspJSON

A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks.
MIT License
203 stars 89 forks source link

Incorrect Time Zone handling #71

Closed VNexsus closed 6 years ago

VNexsus commented 6 years ago

When GetTimeZoneOffset() function calculates positive offset (i.e. "+02:00") returning value does not contain "+", so portion of code in line 693 "... & left(offset, 1) & ..." makes datetime value invalid.

It can be fixed by adding this line of code right before the end of GetTimeZoneOffset() function: if GetTimeZoneOffset > 0 then GetTimeZoneOffset = "+" & GetTimeZoneOffset

rcdmk commented 6 years ago

Hello! I'm grate you pointed this out, but I've removed the TimeZone handling from newer versions. This classes already deal with many things and this was causing some trouble because there is no safe way to get the TZ info in all cases and there is no way to calculate the correct TZ for past or future dates.

Thanks anyway.