i haven't started investigating at all yet but we ...
# lucee
j
i haven't started investigating at all yet but we recently released our app on 5.4.0.8-light (docker image, the light part is the new change). a teammate experiences this in their local now (with master checked out):
to add custom formats for gmt, create/extend on of the following files [gmt--datetime.df (for date time formats), gmt--date.df (for date formats) or gmt--time.df (for time formats)] in the following directory [<context>/lucee/locales].
does that ring any bells?
triggering code:
return lSParseDateTime(this.getStartDate(), 'GMT');
is the solution a DIY one or is it baked into lucee?
z
what's in the date string?
is GMT a locale? timezone is the third argument, not the second https://docs.lucee.org/reference/functions/lsparsedatetime.html
j
ah, yeah, good tip. i'll pass that along. thanks, @zackster
g
Also - Have a troll through the forums for the discussion about the ticket. I am pretty sure that the resolution for the problem I was facing wasn't to create the specific locale / timezone file at all. Additionally, I NOW do all date work in GMT and only ever change it's format / timezone when it is for display. By doing everything in GMT - you can ditch the "LS" functions and just use the "generic" version. parseDate() instead of lsParseDate() etc...
j
Yeah, we got stuck on Chicago time way back in on-prem days when ops folks set up servers on something other than GMT and we haven't been able to dig out from that mess yet.
g
Oh I understand the pain.... Fpr one of our apps, we have the app server and thankfully the DB server in a non GMT timezone... It is a spectacular pain in the ass to even wrap your head around... is this a REAL date, do I need to convert it? debugging / investigations are REALLY fun!
💯 1
I found the forum post: https://dev.lucee.org/t/lsparsedatetime/10173 And what I worked out was: A regions "normal" date time formats are not from a technical perspective. Using my example; In Australia the date format is dd/MM/yyyy I was trying to use LSdateFormat() with : yyyy-MM-dd Sure it is a "standard" date format - according to a RFC/ISO and "tech heads". But ask an Aussie in the street to write a date down - and it will never be yyyy-MM-dd. it might be • dd/MM/yyyy • dd/MM/yy • dd MMM yyyy • dd MMM yy And these work for an LSdateFormat() when using an AU locale.
👍 1