The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-10-2009
python python is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 1
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0