Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
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 ? –  Iain May 20 '12 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. –  David Schwartz May 20 '12 at 21:46

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.