the server time is correct
# cfml-general
a
the server time is correct
ah I think it might be related to the connector the time coming back from the db is an hour out. (it's correct in the db tho)
image.png
z
a
locale is correct
a
Hang on. Yer server should just be in UTC really shouldn't it? Computers don't (and shouldn't) care about TZs; and all the crap that comes out of dealing with DLS offsets and stuff: that's a human thing. Server on UTC, present date/times to humans in whatever TZ best suits them for the situation to hand.
a
locale is correct. time in mysql db is correct, server date/time is correct. but CF pulling the data out of db is incorrect. +1 hr (not adjusting for BST) which leads me to believe is a connector issue?
a
So hang on... you have a DB server which is on [some TZ]. You do a
queryExecute
which returns datetime data, and the values are 1hr different from what it sez in the DB??
And DB server and CF server are on the same TZ (or completely the same box).
a
aye
a
And this is with
<cfoutput>#myQuery.myDateTimeCol[row].dateTimeFormat("yyyy-mm-dd HH:nn:ss")#</cfoutput>
Not just what yer seeing with a
<cfdump>
.
a
both
a
What version of CF?
a
2021
(not lucee)
1
only recently updated and issue has come about
a
Does
GetTimezoneInfo()
say anything fishy?
I mean I think I'm inclined to agree with your assessment. Sounds like you've investigated along the same lines I would be (and am dragging you back through, sorry)
a
Looks all good
here's the record in the db
this code results in
(im aliasing timestamp as datetime in the query)
1
👀 1
a
Humour me. What does
SELECT @@system_time_zone, @@global.time_zone, @@session.time_zone;
(or equiv on whatever DB yer on... that's MySQL) give you? I get:
|UTC|SYSTEM|SYSTEM|
a
I get GMT|SYSTEM|SYSTEM
maybe there's something in that
1
a
yup
a
thing is old server on cf2018 is looking at teh same db without this issue
a
CF is updating to be on BST
a
got them running side by side
a
"being clever"
yeah. CF gets more and more "clever" with every new version.
I'd say fish through the release notes for CF2021 and look at the list of bugs "fixed", and I bet you'll find something. Well you would if Adobe published such a thing, which I'm pretty sure they do not? @saghosh / @Mark Takata (Adobe) is there a canonical list of bugs/issues addressed in each CF version published anywhere?
s
I'll send the url, @Adam Cameron
a
@Alan I'd look in CF's config XML files (which? Couldn't tell you sorry...
grep
is your friend) for references to TZs are see if there's anything about "second guess the System time and mess around with it because reasons" (might not be called exactly that ;-))
I can't find anywhere in CF Admin which says anything about TZs, but then again I find CF Admin to be pretty impenetrable these days.
s
Maybe you had a JVM option to set the TZ to UTC and the CF update removed that?