0

I'm creating a file back up system that uploads via FTP, however when I get the uploaded file name, it says it was generated let's say 4 minutes past 5, when I get the creation time of the file via PHP ftp commands, it says it was created 10 minutes after(14 minutes past 5).

Perhaps the timing is out of sync however when I run 'date' command via ssh it brings back Sun May 20 21:15:04 MSD 2012 which is not even in UK time zone(even tho the server is in UK), how could I check the FTP time and adjust it if I need to?

Hope that makes sense!

2
  • It's not clear: Is your file named for the time it was created, then FTPed to somewhere else where the creation time of the file is different from it's name ?
    – user9517
    May 20, 2012 at 18:14
  • 1
    Use date -u to check system dates. That will give you UTC time regardless of the configured time zone. It would be annoying if servers always gave users their local time -- in general, users don't care (nor should they have to care) where the server is located. May 20, 2012 at 21:46

1 Answer 1

0

Timezone is configured in /etc/sysconfig/clock on RHEL like systems.

You can use date -s and hwclock --systohc to set the time once but you're probably better of setting up NTP on both the clients and the backup server to make sure the time remains in sync.

If that doesn't answer your question you'll have to provide more details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .