Now() returning 1899-12-31

Has anyone had an issue with now() returning the date 1899-12-31? It just started yesterday and is intermittent - both yesterday and today it lasted for around 45 minutes and was specific to one server (a different one yesterday). The time value yesterday was approximately 3 hours and 45 minutes in the future yesterday and around 5 hours and 45 minutes today. It started and stopped on its own.

When it was happening today, I was able to get the correct time from the server using both Java and Javascript. I checked the time on the server and from the Lucee control panel and it was correct. Server time is being pulled from pool.ntp.org and they report no issues. The servers are EC2 Windows instances.

I also checked the Lucee logs and didn’t see anything unusual.

Anyway, I’m at a total loss for what could be going on. The only change to the servers was a routine Windows Server update the day before yesterday.

Any ideas?

Thanks!

Austin

Don’t forget to tell us about your stack!

OS: Windows 2019 Datacenter
Java Version: 11.0.11 (AdoptOpenJDK) 64bit
Tomcat Version: 9.0.46
Lucee Version: 5.4.3.2

1 Like

A similar issue was mentioned on CF Slack today. According to Micha it is some problem with pool.ntp.org. Here’s what he said:

we saw the exact same problem with a client of us, in that case the the server “pool.ntp.org” was enabled and it seem that that server did report an invalid time yesterday, what Lucee did interpret as 0 what is equal to 1900/1/1.
If you have enabled the timeserver best disable it, that feature is not very useful anymore with todays server. we may will remove that from future versions of Lucee.

See also, this earlier thread:

2 Likes

Excellent. Thanks for your help!

Yeah simply disable the time server

1 Like

Thanks everyone. Disabling the time server seems to have done the trick.

Experiencing the same issue sporadically on one server.

Where do I find this service to disable. I’m not finding it in the Lucee admin. Is this a system service?

Never mind. Found it by drilling down into the second example above.

This thread was a lifesaver today. Thanks!

Does anyone know if there’s a way to set this value (“use time server” bool) within application.cfc or as a param during unattended linux install?

if using Lucee 6 adding a line to the .CFConfig.json will work

"useTimeserver": false

Where is the CFConfig.json file?

the Docker installs we use have this path

/opt/lucee/server/lucee-server/context/.CFConfig.json