Re: Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-21 Thread Ben Morrow
[This is not a Perl question. F'ups set to c.l.python.] Quoth Schif Schaf schifsc...@gmail.com: The other day I needed to convert a date like August 2009 into a seconds-since-epoch value (this would be for the first day of that month, at the first second of that day). Note that this is not

Re: Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-20 Thread AggieDan04
On Sep 19, 9:22 pm, Schif Schaf schifsc...@gmail.com wrote: The other day I needed to convert a date like August 2009 into a seconds-since-epoch value (this would be for the first day of that month, at the first second of that day). In Python, I came up with this: #!/usr/bin/env

Re: Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-20 Thread Carl Banks
On Sep 19, 11:02 pm, Ben Morrow b...@morrow.me.uk wrote: [This is not a Perl question. F'ups set to c.l.python.] Heh, I didn't notice the cross-post. Glad I decided against following up with minor philosophical rant. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-19 Thread Schif Schaf
The other day I needed to convert a date like August 2009 into a seconds-since-epoch value (this would be for the first day of that month, at the first second of that day). In Python, I came up with this: #!/usr/bin/env python import datetime import time time_in_sse = time.mktime(

Re: Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-19 Thread Carl Banks
On Sep 19, 7:22 pm, Schif Schaf schifsc...@gmail.com wrote: The other day I needed to convert a date like August 2009 into a seconds-since-epoch value (this would be for the first day of that month, at the first second of that day). In Python, I came up with this: #!/usr/bin/env

Re: Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-19 Thread John Yeung
On Sep 19, 10:57 pm, Carl Banks pavlovevide...@gmail.com wrote: On Sep 19, 7:22 pm, Schif Schaf schifsc...@gmail.com wrote: I *wanted* to just use time.mktime(), but it wouldn't work unless I could specify the *complete* time tuple value (who would have all that handy?!). Was it really

Re: Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

2009-09-19 Thread Skye sh...@#$
On Sep 19, 7:22 pm, Schif Schaf schifsc...@gmail.com wrote: The other day I needed to convert a date like August 2009 into a seconds-since-epoch value (this would be for the first day of that month, at the first second of that day). You could use Time::Piece: [ss...@localhost ~]$ perl