![]() If I dump out getTimeZoneInfo(), the utcHourOffset is correct at -11. Time Zone bug: Today (Oct 8th) is in daylight saving time. “.SSX” or “.SX” etc will throw errors if the mask is three digits.Ĥ. Ie: if the date string ms is three digits (eg “.004Z”) the mask must also be three digits (ie “.SSSX”). the final X is required to maintain UTC adjustments and you must also have the same number of digits in the ms part. the mask for the ms when passed to parseDateTime is ‘S’ NOT ‘L’ (as it is for timeFormat() and dateTimeFormatģ. ![]() the 'T' in the mask – the single quotes are required or an error will be thrown.Ģ. ie converts UTC to local (server) time as long as you specify the ‘X’ in the mask.ġ. The CF date object created by parseDateTime() uses the time zone of the CF server it is running on. Res = parseDateTime(dtStr,"yyyy-MM-dd'T'HH:mm:ss.S") Res = parseDateTime(dtStr,"yyyy-MM-dd'T'HH:mm:ss.SS") Res = parseDateTime(dtStr,"yyyy-MM-dd'T'HH:mm:ss.SSS") Res = parseDateTime(dtStr,"yyyy-MM-dd'T'HH:mm:ss.SSSX") ĭateTimeFormat(res, "yyyy-mm-dd hh:nn:ss.LLL z") The CF docs seem to be unclear regarding the milliseconds. If you want to use that date string in parseDateTime() in ColdFusion 10 (and maybe later versions but not tested by me), you need to specify the correct mask. Note the inclusion of milliseconds and the conversion to the UTC time. returns Mon 11:17:34 GMT+1100 (Australian Eastern Daylight Time) JavaScript generates an ISO 8601 date like this: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |