![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing time zone from ist to bst | manoj.solaris | SUN Solaris | 1 | 10-10-2008 10:56 AM |
| Need to get 4 Hrs back time and compare with successive time | maanik85 | UNIX for Dummies Questions & Answers | 2 | 07-15-2008 09:48 AM |
| Time Zone in AIX and cronjobs | run_time_error | AIX | 1 | 04-28-2006 07:42 AM |
| Time zone setting | sanjay_g | UNIX for Dummies Questions & Answers | 5 | 07-31-2002 11:52 PM |
| Modified time | frank | UNIX for Advanced & Expert Users | 4 | 06-18-2002 11:57 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Compare Last Modified Time across Time Zone
Hi,
I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at GMT, and client is at GMT+5). I need to do file synchronization between this 2 machines, taking the latest updated file from server, and scp it to client. The problem I face is both machines are in different time zone, so that the last modified time doesnt not reflect the actual different. Eg: for file /tmp/test.txt in both machines Server: last modified time is Jan 01, 2009 02:00:00 (at GMT 0) Client: last modified time is Jan 01, 2009 06:00:00 (at GMT +5) From the surface, it looks like the file in Client is the latest. But when you consider it with time zone, you will find that the file in Server is the latest version. After manually fine tuned both file with GMT0: Server: last modified time is Jan 01, 2009 02:00:00 (at GMT 0) Client: last modified time is Jan 01, 2009 01:00:00 (at GMT 0) So, anyone help me to solve this issue? Thank you! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|