Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58864 > unrolled thread
| Started by | Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> |
|---|---|
| First post | 2013-11-08 23:11 +0200 |
| Last post | 2013-11-12 19:20 +0000 |
| Articles | 20 on this page of 66 — 21 participants |
Back to article view | Back to comp.lang.python
datetime question Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-11-08 23:11 +0200
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-08 21:29 +0000
Re: datetime question Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-11-09 00:01 +0200
Re: datetime question Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-08 17:06 -0500
Re: datetime question rurpy@yahoo.com - 2013-11-11 14:49 -0800
Re: datetime question Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-11 18:18 -0500
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-08 22:18 +0000
Re: datetime question Grant Edwards <invalid@invalid.invalid> - 2013-11-08 22:29 +0000
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-09 09:39 +1100
Re: datetime question Roy Smith <roy@panix.com> - 2013-11-09 10:30 -0500
Re: datetime question Gene Heskett <gheskett@wdtv.com> - 2013-11-09 10:39 -0500
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-10 09:25 +1100
Re: datetime question Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-08 22:49 +0000
Re: datetime question Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-11-09 01:02 +0200
Re: datetime question Robert Kern <robert.kern@gmail.com> - 2013-11-08 23:23 +0000
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-09 10:30 +1100
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-09 00:12 +0000
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-09 12:45 +0000
Re: datetime question Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-11-09 15:43 +0200
Re: datetime question unknown <unknown@unknown.com> - 2013-11-10 12:52 +0000
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-09 23:52 +1100
Re: datetime question Gene Heskett <gheskett@wdtv.com> - 2013-11-09 19:55 -0500
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-10 19:47 +1100
Re: datetime question Gene Heskett <gheskett@wdtv.com> - 2013-11-10 04:13 -0500
Re: datetime question Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> - 2013-11-11 11:57 +0200
Re: datetime question Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-11 08:41 -0500
Re: datetime question Roy Smith <roy@panix.com> - 2013-11-11 09:14 -0500
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-12 01:25 +1100
Re: datetime question Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-11 09:36 -0500
Re: datetime question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-11 20:59 -0500
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-12 13:02 +1100
Re: datetime question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-11 21:02 -0500
Re: datetime question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-12 19:30 -0500
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-13 11:40 +1100
Re: datetime question Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-11 19:19 +0000
Re: datetime question Ethan Furman <ethan@stoneleaf.us> - 2013-11-11 11:39 -0800
Re: datetime question Grant Edwards <invalid@invalid.invalid> - 2013-11-11 20:45 +0000
Re: datetime question mm0fmf <none@mailinator.com> - 2013-11-11 23:21 +0000
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-11 23:48 +0000
Re: datetime question Grant Edwards <invalid@invalid.invalid> - 2013-11-12 04:49 +0000
Re: datetime question alex23 <wuwei23@gmail.com> - 2013-11-12 17:25 +1000
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-12 18:35 +1100
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-12 09:20 +0000
Re: datetime question Roy Smith <roy@panix.com> - 2013-11-12 09:18 -0500
Re: datetime question Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-11-12 12:15 +0200
Re: datetime question Andy Lawton <andy@andylawton.eu> - 2013-11-12 12:47 +0000
Re: datetime question Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-11-12 15:32 +0200
Re: datetime question Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-12 09:03 -0500
Re: datetime question Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-11-12 16:12 +0200
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-13 01:57 +1100
Re: datetime question Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-11-12 17:24 +0200
Re: datetime question Tim Chase <python.list@tim.thechases.com> - 2013-11-12 09:54 -0600
Re: datetime question Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-11-12 17:57 +0200
Re: datetime question Tim Chase <python.list@tim.thechases.com> - 2013-11-12 10:12 -0600
Re: datetime question William Ray Wing <wrw@mac.com> - 2013-11-12 11:14 -0500
Re: datetime question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-12 16:30 +0000
Re: datetime question MRAB <python@mrabarnett.plus.com> - 2013-11-12 19:09 +0000
Re: datetime question Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-12 14:14 -0500
Re: datetime question Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-12 19:24 +0000
Re: datetime question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-12 19:38 -0500
Re: datetime question Chris Angelico <rosuav@gmail.com> - 2013-11-13 09:42 +1100
Re: datetime question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-12 19:37 -0500
Re: datetime question MRAB <python@mrabarnett.plus.com> - 2013-11-13 01:08 +0000
Re: datetime question Alister <alister.ware@ntlworld.com> - 2013-11-12 16:11 +0000
Re: datetime question Roy Smith <roy@panix.com> - 2013-11-12 19:43 -0500
Re: datetime question Denis McMahon <denismfmcmahon@gmail.com> - 2013-11-12 19:20 +0000
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-09 23:52 +1100 |
| Message-ID | <mailman.2292.1384001568.18130.python-list@python.org> |
| In reply to | #58881 |
On Sat, Nov 9, 2013 at 11:45 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > Why is Web Security for Dummies missing? Because a Dummy can host a web (all you have to do is invite a spider into your house and let it do the work), but he won't be able to make it secure. Or, more succinctly: Because it isn't. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@wdtv.com> |
|---|---|
| Date | 2013-11-09 19:55 -0500 |
| Message-ID | <mailman.2322.1384072270.18130.python-list@python.org> |
| In reply to | #58864 |
On Saturday 09 November 2013 19:52:52 Chris Angelico did opine:
> On Sun, Nov 10, 2013 at 2:39 AM, Gene Heskett <gheskett@wdtv.com> wrote:
> > Ya know, folks like Nick would have me signing off. Fortunately there
> > are kill files. But the backscatter he creates I am still forced to
> > read, or more usually skip.
> >
> > Then one of you frustrated standup comics comes along, and gives me a
> > VBG, and its suddenly all worth it. Thank You Chris.
> :
> :) Don't just thank me, Grant and Roy were key to it too - and the
>
> whole "there's no shortage of newlines" thing started with Steven
> D'Aprano (I think), and it's a ripe field for harvest :)
And likely not fully gleaned yet. :) To all of you, thats some of the
better creative writing I've read in my 79 years. ;-)
> But hey. If you're going to have to read backscatter, may as well make
> it funny...
Precisely.
> ChrisA
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
A Difficulty for Every Solution.
-- Motto of the Federal Civil Service
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-10 19:47 +1100 |
| Message-ID | <mailman.2325.1384073269.18130.python-list@python.org> |
| In reply to | #58864 |
On Sun, Nov 10, 2013 at 11:55 AM, Gene Heskett <gheskett@wdtv.com> wrote: > On Saturday 09 November 2013 19:52:52 Chris Angelico did opine: >> :) Don't just thank me, Grant and Roy were key to it too - and the >> whole "there's no shortage of newlines" thing started with Steven >> D'Aprano (I think), and it's a ripe field for harvest :) > > And likely not fully gleaned yet. :) To all of you, thats some of the > better creative writing I've read in my 79 years. ;-) Are you going to have a newyear after next year and start over with Year 1 again? ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Gene Heskett <gheskett@wdtv.com> |
|---|---|
| Date | 2013-11-10 04:13 -0500 |
| Message-ID | <mailman.2327.1384076098.18130.python-list@python.org> |
| In reply to | #58864 |
On Sunday 10 November 2013 04:06:06 Chris Angelico did opine:
> On Sun, Nov 10, 2013 at 11:55 AM, Gene Heskett <gheskett@wdtv.com> wrote:
> > On Saturday 09 November 2013 19:52:52 Chris Angelico did opine:
> >> :) Don't just thank me, Grant and Roy were key to it too - and the
> >>
> >> whole "there's no shortage of newlines" thing started with Steven
> >> D'Aprano (I think), and it's a ripe field for harvest :)
> >
> > And likely not fully gleaned yet. :) To all of you, thats some of the
> > better creative writing I've read in my 79 years. ;-)
>
> Are you going to have a newyear after next year and start over with
> Year 1 again?
>
Nah. I tried to put it off as long as I could, but times arrow, dammit,
only points forward. I might as well get used to it. From that famous
line about death and taxes, taxes will of course outlive me. Being a DM-II,
I of course haven't a shred of warranty left. Just up to pee and check on
that falling satellite, I could fall over walking the 20 feet back to bed,
but I'm going to do it anyway... ;-)
> ChrisA
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
$100 invested at 7% interest for 100 years will become $100,000, at
which time it will be worth absolutely nothing.
-- Lazarus Long, "Time Enough for Love"
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-11-11 11:57 +0200 |
| Message-ID | <l5q9me$lk6$1@dont-email.me> |
| In reply to | #58864 |
Στις 8/11/2013 11:11 μμ, ο/η Νίκος Αλεξόπουλος έγραψε: > Is there someway to write the following line even better with the > ability to detect daylight saving time by itself so i don't have to > alter the line manually when time changes? > > lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( > '%y-%m-%d %H:%M:%S' ) # MySQL datetime format > > Thanks. Someone has an idea what to add to this line to automatically adjust itself if DST happens?
[toc] | [prev] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2013-11-11 08:41 -0500 |
| Message-ID | <mailman.2377.1384177268.18130.python-list@python.org> |
| In reply to | #59059 |
On Mon, Nov 11, 2013 at 4:57 AM, Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> wrote: > Στις 8/11/2013 11:11 μμ, ο/η Νίκος Αλεξόπουλος έγραψε: > >> Is there someway to write the following line even better with the >> ability to detect daylight saving time by itself so i don't have to >> alter the line manually when time changes? >> >> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format >> >> Thanks. > > > > Someone has an idea what to add to this line to automatically adjust itself Three days ago Mark Lawrence pointed you to a stack overflow answer to your question. While it didn't suit your demand for a single line answer, it could easily be made into a function which returned the string format that you requested. You've been around long enough to try to work that out for yourself. If you yourself had returned with a one liner to perform what Mark showed you, I can imagine a lot of people would be impressed at your dedication! I think you are oversimplifying the problem. I recall that you server is in Germany, and you are in Greece. If these are two different time zones, I am guessing that the German time will be given. Also, any linux user who runs package updates regularly (thinking Ubuntu) realizes that some file that starts with tz gets changed quite often. This is because time zones are set by governments, and the date of change from standard to daylight time can be differently, depending upon the location and the governing body. I pose this question to you: Why not display UTC? If it is so important to you to display local time, why do you think that your host's local time is something that is useful for a visitor? Daylight savings time is more complicated that you have suggested > if DST happens? If you insist upon displaying the local time of your server, you should not be hardcoding in a 2 hour difference. Let the python library figure out the delta by giving the country code > -- > https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2013-11-11 09:14 -0500 |
| Message-ID | <roy-E1C94F.09145811112013@news.panix.com> |
| In reply to | #59073 |
In article <mailman.2377.1384177268.18130.python-list@python.org>, Joel Goldstick <joel.goldstick@gmail.com> wrote: > Why not display UTC? If it is so important to you to display local > time, why do you think that your host's local time is something that > is useful for a visitor? In general, it makes sense to run servers (and log everything) in UTC, and display local time to your users. The idea is to do the conversion (in both directions) as close to the user as possible (which, for a web application, means a little piece of javascript right in the browser). It seems like extra work, but, trust me, it will preserve your sanity eventually. We've got a data supplier who (for reasons I cannot fathom), runs their network in local time. Every time we talk to them about problems, it's a mess just trying to figure out what time we're talking about. We say, "we saw a latency spike at 2243 UTC, what caused that?", and then we play 20-questions trying to figure out if that's 1443 PDT, or 1543 PST, or who knows what. Further complicated by them occasionally asking us off-the-wall questions like, "Is that UTC daylight savings time?"
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-12 01:25 +1100 |
| Message-ID | <mailman.2380.1384179943.18130.python-list@python.org> |
| In reply to | #59077 |
On Tue, Nov 12, 2013 at 1:14 AM, Roy Smith <roy@panix.com> wrote: > We've got a data supplier who (for reasons I cannot fathom), runs their > network in local time. Every time we talk to them about problems, it's > a mess just trying to figure out what time we're talking about. We say, > "we saw a latency spike at 2243 UTC, what caused that?", and then we > play 20-questions trying to figure out if that's 1443 PDT, or 1543 PST, > or who knows what. Further complicated by them occasionally asking us > off-the-wall questions like, "Is that UTC daylight savings time?" UGH. Yes. I get the same thing from some of the US players in my Dungeons & Dragons campaign. To avoid the hassles of international times, everything's scheduled in UTC; the Aussies, the Europeans, and _some of_ the Americans an handle it, but there are a few who keep asking me crazy questions about DST and UTC. I'm like... no, there is no daylight time! Just look at the current UTC time and see how that compares! There's even a command in-game that shows current UTC time. Fortunately, those people are in the minority. Most of the players can handle the time conversions. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Date | 2013-11-11 09:36 -0500 |
| Message-ID | <mailman.2381.1384180675.18130.python-list@python.org> |
| In reply to | #59077 |
So this is a physics joke. The engineers and physicists at the conference went to dinner. They ordered wine with dinner. The wait person asked: "Would you like the small liter, or the large liter?" -- Joel Goldstick http://joelgoldstick.com
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-11-11 20:59 -0500 |
| Message-ID | <mailman.2420.1384221605.18130.python-list@python.org> |
| In reply to | #59077 |
On Tue, 12 Nov 2013 01:25:39 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following:
>
>UGH. Yes. I get the same thing from some of the US players in my
>Dungeons & Dragons campaign. To avoid the hassles of international
>times, everything's scheduled in UTC; the Aussies, the Europeans, and
>_some of_ the Americans an handle it, but there are a few who keep
>asking me crazy questions about DST and UTC. I'm like... no, there is
>no daylight time! Just look at the current UTC time and see how that
>compares! There's even a command in-game that shows current UTC time.
>
>Fortunately, those people are in the minority. Most of the players can
>handle the time conversions.
>
Let's add astronomical Julian Dates... Where the "day" changes at
"noon" (avoids the hassle of an observation starting at 2300 <day x> and
ending at 0100 <day y) -- both times would still be in <day x>
Of course, I'm spoiled... My /watch/ has a dial for UTC, along with one
for 24-hour indication (one hand, range 1 to 24)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-12 13:02 +1100 |
| Message-ID | <mailman.2421.1384221787.18130.python-list@python.org> |
| In reply to | #59077 |
On Tue, Nov 12, 2013 at 12:59 PM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote: > Of course, I'm spoiled... My /watch/ has a dial for UTC, along with one > for 24-hour indication (one hand, range 1 to 24) Heh. Mine doesn't, so I bought myself a second watch and set it to UTC. So my left hand has local time (changes at DST breaks, changes when I travel internationally), and my right hand has UTC (never changes). ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-11-11 21:02 -0500 |
| Message-ID | <mailman.2422.1384221909.18130.python-list@python.org> |
| In reply to | #59077 |
On Mon, 11 Nov 2013 09:36:09 -0500, Joel Goldstick
<joel.goldstick@gmail.com> declaimed the following:
>So this is a physics joke. The engineers and physicists at the
>conference went to dinner. They ordered wine with dinner. The wait
>person asked: "Would you like the small liter, or the large liter?"
Pardon? Makes no sense to me...
A question about small pint or large pint, OTOH...
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2013-11-12 19:30 -0500 |
| Message-ID | <mailman.2511.1384302621.18130.python-list@python.org> |
| In reply to | #59077 |
On Tue, 12 Nov 2013 13:02:58 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following:
>On Tue, Nov 12, 2013 at 12:59 PM, Dennis Lee Bieber
><wlfraed@ix.netcom.com> wrote:
>> Of course, I'm spoiled... My /watch/ has a dial for UTC, along with one
>> for 24-hour indication (one hand, range 1 to 24)
>
>Heh. Mine doesn't, so I bought myself a second watch and set it to
>UTC. So my left hand has local time (changes at DST breaks, changes
>when I travel internationally), and my right hand has UTC (never
>changes).
>
http://www.amazon.com/Citizen-JY0000-53E-Skyhawk-Eco-Drive-Watch/dp/B000ZPMYQI
Only watch I've ever heard of having a recall... The radio synch logic
fell apart a few years back, and lost a day. As a result mine now has a
mark from a small center punch on the back to identify it as having had its
firmware redone.
I recall the sales lady's blunder... After persuading me on this model
(it was replacing an earlier Citizen Navi-Hawk as I recall) she tried to
sell me a battery replacement service plan -- for a watch that charges via
solar panel!
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-13 11:40 +1100 |
| Message-ID | <mailman.2513.1384303204.18130.python-list@python.org> |
| In reply to | #59077 |
On Wed, Nov 13, 2013 at 11:30 AM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote: > On Tue, 12 Nov 2013 13:02:58 +1100, Chris Angelico <rosuav@gmail.com> > declaimed the following: > >>On Tue, Nov 12, 2013 at 12:59 PM, Dennis Lee Bieber >><wlfraed@ix.netcom.com> wrote: >>> Of course, I'm spoiled... My /watch/ has a dial for UTC, along with one >>> for 24-hour indication (one hand, range 1 to 24) >> >>Heh. Mine doesn't, so I bought myself a second watch and set it to >>UTC. So my left hand has local time (changes at DST breaks, changes >>when I travel internationally), and my right hand has UTC (never >>changes). >> > > > http://www.amazon.com/Citizen-JY0000-53E-Skyhawk-Eco-Drive-Watch/dp/B000ZPMYQI > > Only watch I've ever heard of having a recall... The radio synch logic > fell apart a few years back, and lost a day. As a result mine now has a > mark from a small center punch on the back to identify it as having had its > firmware redone. > > I recall the sales lady's blunder... After persuading me on this model > (it was replacing an earlier Citizen Navi-Hawk as I recall) she tried to > sell me a battery replacement service plan -- for a watch that charges via > solar panel! My UTC watch is an Eco-Drive too, but without radio sync, and much simpler all round than yours. And roughly half the price, and that counting the Amazon price not the list price. I don't think I could justify to myself spending $650 on a second watch!! If only more people would start "thinking UTC", all sorts of synchronization problems would vanish. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2013-11-11 19:19 +0000 |
| Message-ID | <l5rakv$kt3$1@dont-email.me> |
| In reply to | #59059 |
On Mon, 11 Nov 2013 11:57:36 +0200, Νίκος Αλεξόπουλος wrote: >> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format > Someone has an idea what to add to this line to automatically adjust > itself if DST happens? Yes, but the scarcity of universal whitespace is preventing me from posting it. -- Denis McMahon, denismfmcmahon@gmail.com
[toc] | [prev] | [next] | [standalone]
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2013-11-11 11:39 -0800 |
| Message-ID | <mailman.2394.1384201602.18130.python-list@python.org> |
| In reply to | #59093 |
On 11/11/2013 11:19 AM, Denis McMahon wrote: > On Mon, 11 Nov 2013 11:57:36 +0200, Νίκος Αλεξόπουλος wrote: > >>> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >>> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format > >> Someone has an idea what to add to this line to automatically adjust >> itself if DST happens? > > Yes, but the scarcity of universal whitespace is preventing me from > posting it. Boy, are you in luck! I just happen to have a whole heap of marked down ascii white-space at bargain basement prices! -- ~Ethan~
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2013-11-11 20:45 +0000 |
| Message-ID | <l5rflq$e1l$1@reader1.panix.com> |
| In reply to | #59094 |
On 2013-11-11, Ethan Furman <ethan@stoneleaf.us> wrote:
> On 11/11/2013 11:19 AM, Denis McMahon wrote:
>> On Mon, 11 Nov 2013 11:57:36 +0200, ?????????? ?????????????????????? wrote:
>>
>>>> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime(
>>>> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format
>>
>>> Someone has an idea what to add to this line to automatically adjust
>>> itself if DST happens?
>>
>> Yes, but the scarcity of universal whitespace is preventing me from
>> posting it.
>
> Boy, are you in luck! I just happen to have a whole heap of marked
> down ascii white-space at bargain basement prices!
Careful, a lot of the cheap imported whitespace was made with toxic
lead carbonate instead of the non-toxic titatium oxide that should be
used...
--
Grant Edwards grant.b.edwards Yow! I'd like MY data-base
at JULIENNED and stir-fried!
gmail.com
[toc] | [prev] | [next] | [standalone]
| From | mm0fmf <none@mailinator.com> |
|---|---|
| Date | 2013-11-11 23:21 +0000 |
| Message-ID | <eEdgu.19790$In1.19616@fx26.am4> |
| In reply to | #59094 |
On 11/11/2013 19:39, Ethan Furman wrote: > On 11/11/2013 11:19 AM, Denis McMahon wrote: >> On Mon, 11 Nov 2013 11:57:36 +0200, Νίκος Αλεξόπουλος wrote: >> >>>> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >>>> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format >> >>> Someone has an idea what to add to this line to automatically adjust >>> itself if DST happens? >> >> Yes, but the scarcity of universal whitespace is preventing me from >> posting it. > > Boy, are you in luck! I just happen to have a whole heap of marked down > ascii white-space at bargain basement prices! > Is that metric or imperial whitespace? You need metric whitespace for programs written in Europe.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-11-11 23:48 +0000 |
| Message-ID | <mailman.2410.1384213745.18130.python-list@python.org> |
| In reply to | #59118 |
On 11/11/2013 23:21, mm0fmf wrote: > On 11/11/2013 19:39, Ethan Furman wrote: >> On 11/11/2013 11:19 AM, Denis McMahon wrote: >>> On Mon, 11 Nov 2013 11:57:36 +0200, Νίκος Αλεξόπουλος wrote: >>> >>>>> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >>>>> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format >>> >>>> Someone has an idea what to add to this line to automatically adjust >>>> itself if DST happens? >>> >>> Yes, but the scarcity of universal whitespace is preventing me from >>> posting it. >> >> Boy, are you in luck! I just happen to have a whole heap of marked down >> ascii white-space at bargain basement prices! >> > > Is that metric or imperial whitespace? > > You need metric whitespace for programs written in Europe. > Except for the UK, our multi-national approach means that both imperial and metric whitespace are acceptable. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Date | 2013-11-12 04:49 +0000 |
| Message-ID | <l5sc04$3vd$1@reader1.panix.com> |
| In reply to | #59119 |
On 2013-11-11, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > On 11/11/2013 23:21, mm0fmf wrote: >> On 11/11/2013 19:39, Ethan Furman wrote: >>> On 11/11/2013 11:19 AM, Denis McMahon wrote: >>>> On Mon, 11 Nov 2013 11:57:36 +0200, ?????????? ?????????????????????? wrote: >>>> >>>>>> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >>>>>> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format >>>> >>>>> Someone has an idea what to add to this line to automatically adjust >>>>> itself if DST happens? >>>> >>>> Yes, but the scarcity of universal whitespace is preventing me from >>>> posting it. >>> >>> Boy, are you in luck! I just happen to have a whole heap of marked down >>> ascii white-space at bargain basement prices! >> >> Is that metric or imperial whitespace? >> >> You need metric whitespace for programs written in Europe. > > Except for the UK, our multi-national approach means that both imperial > and metric whitespace are acceptable. Don't forget that there are also some differences between American and Imperial whitespace. Since it's ASCII whitespace, you should probably assume American... -- Grant
[toc] | [prev] | [next] | [standalone]
Page 2 of 4 — ← Prev page 1 [2] 3 4 Next page →
Back to top | Article view | comp.lang.python
csiph-web