Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-03 Thread Barry Scott
On 2 Jan 2013, at 08:01, Victor Hooi wrote: > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. >

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Dave Angel
On 01/02/2013 12:34 PM, Chris Angelico wrote: > On Thu, Jan 3, 2013 at 4:27 AM, Roy Smith wrote: >> In article , >> Chris Angelico wrote: >> I assume you mean timestamps. A date doesn't need to worry about UTC the way a timestamp does. >> I'm not sure how a date and a timestamp differ

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 4:27 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >>> I assume you mean timestamps. A date doesn't need to worry about UTC >>> the way a timestamp does. > > I'm not sure how a date and a timestamp differ in any significant > way. A date is just a very low

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Roy Smith
In article , Chris Angelico wrote: >> I assume you mean timestamps. A date doesn't need to worry about UTC >> the way a timestamp does. I'm not sure how a date and a timestamp differ in any significant way. A date is just a very low-precision time. >> 3) Run all your servers with their timezo

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 1:28 AM, Roy Smith wrote: > PPS: Some additional hints for staying sane while working with dates: I assume you mean timestamps. A date doesn't need to worry about UTC the way a timestamp does. Beyond that, I agree with most of your comments. > 3) Run all your servers with

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Roy Smith
In article , Victor Hooi wrote: > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. In what timez

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Dave Angel
On 01/02/2013 03:01 AM, Victor Hooi wrote: > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. > > Acco

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Vlastimil Brom
2013/1/2 Victor Hooi : > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. > > According to the docs, m

Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Victor Hooi
Hi, I'm using pysvn to checkout a specific revision based on date - pysvn will only accept a date in terms of seconds since the epoch. I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to seconds since epoch. According to the docs, mktime expects a 9-element tuple. My q