Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2019-09-10 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+
 Reporter:  Markus Bertheau  |Owner:  (none)
 Type:  Bug  |   Status:  closed
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by felixxm):

 * status:  new => closed
 * needs_better_patch:  1 => 0
 * resolution:   => fixed
 * needs_tests:  1 => 0
 * needs_docs:  1 => 0


Comment:

 It was fixed by 1014ba026e879e56e0f265a8d9f54e6f39843348 and
 c7a6996df7e77bc3b9c5e581e67d766627ebabec.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.cf810a2ceb0338164e4330f7d18989c1%40djangoproject.com.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2015-11-09 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+
 Reporter:  mbertheau|Owner:
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+

Comment (by Tim Graham ):

 In [changeset:"ca0278f49652c0069d82c08917e0c420dede207b" ca0278f4]:
 {{{
 #!CommitTicketReference repository=""
 revision="ca0278f49652c0069d82c08917e0c420dede207b"
 [1.9.x] Fixed debug view crash during autumn DST change.

 This only happens if USE_TZ = False and pytz is installed (perhaps not
 the most logical combination, but who am I to jugde?)

 Refs #23714 which essentially fixed the same problem when USE_TZ = True.

 Thanks Florian and Carl for insisting until I wrote a complete patch.

 Backport of 1014ba026e879e56e0f265a8d9f54e6f39843348 from master
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.73a712b4eace3ee693a9a265838317c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2015-11-07 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+
 Reporter:  mbertheau|Owner:
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+

Comment (by Aymeric Augustin ):

 In [changeset:"94d13415d81f24743045bcaa43027c737e2bcf5f" 94d1341]:
 {{{
 #!CommitTicketReference repository=""
 revision="94d13415d81f24743045bcaa43027c737e2bcf5f"
 [1.8.x] Fixed debug view crash during autumn DST change.

 This only happens if USE_TZ = False and pytz is installed (perhaps not
 the most logical combination, but who am I to jugde?)

 Refs #23714 which essentially fixed the same problem when USE_TZ = True.

 Thanks Florian and Carl for insisting until I wrote a complete patch.

 Backport of 1014ba026e from master
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.d8f4e9fc6509cdc8a6dfc245d1ed645b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2015-11-07 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+
 Reporter:  mbertheau|Owner:
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+

Comment (by Aymeric Augustin ):

 In [changeset:"1014ba026e879e56e0f265a8d9f54e6f39843348" 1014ba02]:
 {{{
 #!CommitTicketReference repository=""
 revision="1014ba026e879e56e0f265a8d9f54e6f39843348"
 Fixed debug view crash during autumn DST change.

 This only happens if USE_TZ = False and pytz is installed (perhaps not
 the most logical combination, but who am I to jugde?)

 Refs #23714 which essentially fixed the same problem when USE_TZ = True.

 Thanks Florian and Carl for insisting until I wrote a complete patch.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.0a256958a73992891d4cab79c40ae169%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2015-02-15 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+
 Reporter:  mbertheau|Owner:
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+
Changes (by aaugustin):

 * owner:  aaugustin =>
 * status:  assigned => new


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6b58074b52b8f318ad3b53636ca456c5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2015-02-10 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+-
 Reporter:  mbertheau|Owner:  aaugustin
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"c6a49d4f17db4579389e3f0477436f2444dead10"]:
 {{{
 #!CommitTicketReference repository=""
 revision="c6a49d4f17db4579389e3f0477436f2444dead10"
 [1.8.x] Fixed a crash of the debug page.

 During the autumn DST change, the template engine would fail to convert
 the naive representation of now when USE_TZ = True. Passing now in UTC
 eliminates the issue.

 Thanks mbertheau and tricoder42.

 Refs #23714.

 Backport of c7a6996df7e77bc3b9c5e581e67d766627ebabec from master
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.ec5238361d00ee054e35cc4905c74e32%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2015-02-10 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+-
 Reporter:  mbertheau|Owner:  aaugustin
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"c7a6996df7e77bc3b9c5e581e67d766627ebabec"]:
 {{{
 #!CommitTicketReference repository=""
 revision="c7a6996df7e77bc3b9c5e581e67d766627ebabec"
 Fixed a crash of the debug page.

 During the autumn DST change, the template engine would fail to convert
 the naive representation of now when USE_TZ = True. Passing now in UTC
 eliminates the issue.

 Thanks mbertheau and tricoder42.

 Refs #23714.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f365850e817e2ffbdcd0888570ecb2db%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+-
 Reporter:  mbertheau|Owner:  aaugustin
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

 * owner:  tricoder42 => aaugustin


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.670b232858f6dac736f79043e846cd02%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+--
Changes (by tricoder42):

 * needs_better_patch:  0 => 1
 * needs_docs:  0 => 1


Comment:

 After discussion on PR, we're waiting for approval from @aaugustin:
 Naive datetimes returns empty string for any timezone-related format
 specifiers (for the whole year). This is backward-incompatible change
 which will be mentioned in docs.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f5503c20f215fa3021fdf0771c14e380%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by tricoder42):

 Replying to [comment:16 carljm]:
 > I'm not seeing a link to a pull request anywhere in this thread.

 It's in the ticket's header (https://github.com/django/django/pull/3576)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4c1d6aa0260dccc48f0edb4b4eddd7fd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by carljm):

 I'm not seeing a link to a pull request anywhere in this thread.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.154ee468085c4c331340be3599c32e10%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by tricoder42):

 * has_patch:  0 => 1


Comment:

 I've updated the pull request, fixed also other `TimeFormat` formats.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b1c1b7a5398fc523d74df1ba499c119c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by tricoder42):

 Just to be precise: The problem occurs only for '''naive''' datetime
 during '''DST''' change. For other cases the timezone functions/formats
 works fine even for naive datetimes.

 And yes, we should fix all other formats as well. I'll do it later.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.058f218ceb9bdf88234ac1eb6148b941%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by mbertheau):

 I'm not aware of all the circumstances that TimeFormat is given a naive
 datetime - with that caveat I think showing a warning, similar to what
 tricoder42 suggested, whenever TimeFormat gets a naive datetime. The
 warning could be similar to the datetime model field warning.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.18dd3dbb296633b321d3df4fb670bbe7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by mbertheau):

 Reading the code more closely, I'm convinced, that the correct fix is to
 change TimeFormat.Z to return an empty string if given a naive datetime.
 This is in line with python's strftime, which exhibits the same behaviour.

 If you agree, then the scope of this is actually bigger: TimeFormat
 shouldn't make up a timezone for anything, if given a naive datetime. This
 then concerns TimeFormat.e, TimeFormat.O, TimeFormat.T, TimeFormat.Z and
 DateFormat.I.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8575d9eb5c9797374fe642cf6c8dddec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by tricoder42):

 Alright, I simplified the solution a little bit. Added explanation into
 docs.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6cd8d210c426df33c61220e88a44b0bd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by tricoder42):

 I understand that usually templates handle exceptions silently, printing
 nothing on error. I just don't like the idea that for one hour a year, the
 template won't display datetime at all (for naive datetimes). Yes, we're
 making a decision instead of users, but they won't know about this issue,
 since it's occurrence is so rare. This isn't a common scenario which is
 easily tested.

 Maybe at least show warning so user can see in logs what happened and why?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.1d4dac986e6124deb18f8c9890df1255%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by aaugustin):

 Replying to [comment:8 mbertheau]:
 > Instead the template code should handle AmbiguousTimeError and silently
 return an empty string.

 Yes, that is the correct fix (or at least the fix consistent with how
 Django handles ambiguous datetimes in general).

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b0267fbc24fbdafb8d35437c70ec576d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--

Comment (by mbertheau):

 I think handling AmbiguousTimeError in dateformat essentially means we're
 making a business logic decision on behalf of the implementor that we
 shouldn't make for him - his business logic might dictate a different
 decision.

 Instead the template code should handle AmbiguousTimeError and silently
 return an empty string.

 Kudos for fixing the root issue where a naive datetime was put in the
 context :) This part can surely be commit separately, because it solves
 the first problem that the technical 500 page doesn't work during DST
 change.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.fb6792dd856f0778263b0362c0337b09%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change

2014-11-19 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+--
 Reporter:  mbertheau|Owner:  tricoder42
 Type:  Bug  |   Status:  assigned
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by tricoder42):

 * owner:  nobody => tricoder42
 * status:  new => assigned
 * needs_tests:  0 => 1


Comment:

 Tests are still missings. Should be simple though.

 I don't like the fix, but can't figure out anything better. As mentioned
 in PR: The except block catching all exceptions is ugly, but I can't rely
 on pytz library, which is optional, and therefore I can't catch
 pytz.exceptions.AmbiguousTimeError exception.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.26b2a86027a30676292d0894421409d0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #23714: `date` filter raises an exception for naive datetimes during DST change (was: Django-1.7 doesn't display 500 error pages during DST change)

2014-11-18 Thread Django
#23714: `date` filter raises an exception for naive datetimes during DST change
-+
 Reporter:  mbertheau|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Template system  |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  timezone | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by tricoder42):

 * keywords:   => timezone


Comment:

 That's right, with installed `pytz` I can see the exception.

 Minimal code to reproduce the problem:
 {{{#!python
 from django.conf import settings
 settings.configure(USE_TZ=True, TIME_ZONE='Europe/Amsterdam')

 import datetime
 from django.utils.dateformat import DateFormat

 right_now = datetime.datetime.now().replace(2014, 10, 26, 2, 30)
 print(DateFormat(right_now).format('Z'))
 }}}

 In my opinion it's more serious because it doesn't affect just 500 debug
 page, but all templates that uses `date` filter with `r`, `O` or `Z`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.3e5d4ebd878ea8e445445e298c0def34%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.