Dims
Dims

Reputation: 51049

How Auto Deployer handles date-times?

I have a server in a different time zone than my development computer.

The WAR file is unable to contain timezone information.

So how does the auto deployer decide what to copy and what not to copy?

I have many errors on this topic. Sometimes I get a message that the file is modified in future. Other times my upload is not activating or files are not copied.

I am placing a WAR to deploy folder with SSH/SCP (ant SCP task).

Upvotes: 2

Views: 200

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48067

The auto deployer basically deploys everything, unconditionally.

If you copy your application through a low-bandwidth connection though, it might start, before the WAR file has arrived completely, thus generating a lot of errors in the log.

I've seen occasional messages of files having future modification dates, so far I can't remember any particular problems that arose. You might want to play with the declaration of timezone for your whole server and try variations of what the hardware clock is set to vs. what timezone your server is in. The same for your build server - you might want to timestamp files based on UTC, local timezone or the server's (configured) timezone.

Note that the OS might have some setting while Java might assume a different setting, thus getting in conflict. You're right: Files and directories are timestamped with pure times, not timezone information.

In case your timezone & timestamp variations lead to some insight that Liferay's or tomcat's interpretation of the timestamps is incorrect, you might want to file an issue with information on how to reproduce. I'm assuming that this requires a lot of detail though, in order to be reproducible on other sides. Timestamp issues might be difficult to reproduce "this side of UTC" vs "the other side of UTC" - e.g. west and east of UTC timezones, so please give as much information as you can:

  • how is your build server configured
  • how is your deployment server configured
  • what's the timestamp of files contained in the WAR file, timestamp of the WAR file itself
  • when you start the server, what's the timestamp of the logfile
  • what's the time logged within the server log? Does it match the timestamp of the file?
  • what side of UTC are you on?

Upvotes: 1

Related Questions