[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] Assertion errors in rdiff-backup 0.13.3
From: |
Ben Escoto |
Subject: |
Re: [rdiff-backup-users] Assertion errors in rdiff-backup 0.13.3 |
Date: |
Sun, 1 Feb 2004 12:09:32 -0800 |
>>>>> "Gr We" <address@hidden>
>>>>> wrote the following on Sun, 01 Feb 2004 19:47:11 +0000
> I runned the shell command date and date -u on both systems (both showing
> correct info).
..
> And than I figured out how to print current time in python, with:
> import time;
> t = time.time()
> print t
> s = time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(t))
> print s
> print "if", time.daylight, "then offset=", -1 * time.altzone/60, "and
> prefix=+"
> print "else offset=", -1 * time.timezone/60, "and prefix=-"
> print "if offset==0 then Z"
Hi, I haven't fully read all your messages yet, but it may help if I
quickly say that you can use rdiff_backup's time functions pretty
easily. For example:
laptop:~ $ python
Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
[GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import rdiff_backup.Time as t
>>> t.timetostring(time.time())
'2004-02-01T12:07:30-07:00'
>>> t.stringtotime('2004-02-01T12:07:30-07:00')
1075666050L
>>> t.stringtotime(t.timetostring(1075666050L))
1075666050L
> As I can see both informations are the same (same offset and prefix), but
> the interesting thing is, that my increments have the character "Z" written.
> I have no idea why.
Z is for UTC.
--
Ben Escoto
pgplKdxO6qraN.pgp
Description: PGP signature