Changeset 280

Show
Ignore:
Timestamp:
01/22/2007 07:20:54 PM
Author:
luedi
Message:

correctly calculate the timestamp (fixes #47)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/script/Vss2Svn/Dumpfile.pm

    r279 r280  
    33use Vss2Svn::Dumpfile::Node; 
    44use Vss2Svn::Dumpfile::SanityChecker; 
     5require Time::Local; 
    56 
    67use warnings; 
     
    764765    my($vss_timestamp) = @_; 
    765766 
     767    # set the correct time: VSS stores the local time as the timestamp, but subversion 
     768    # needs a gmtime. So we need to reverse adjust the timestamp in order to turn back 
     769    # the clock. 
    766770    my($sec, $min, $hour, $day, $mon, $year) = gmtime($vss_timestamp); 
     771    my($faketime) = Time::Local::timelocal ($sec, $min, $hour, $day, $mon, $year); 
     772    ($sec, $min, $hour, $day, $mon, $year) = gmtime($faketime); 
    767773 
    768774    $year += 1900; 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.