~fabrixxm/confy-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH confy] Correct day for events that are after UTC midnight

Details
Message ID
<168953473237.22687.7070646103054085637-0@git.sr.ht>
DKIM signature
missing
Download raw message
Patch: +1 -1
From: Edward Betts <edward@4angle.com>

Fix for events that happen after midnight in UTC showing on the wrong
day.
---
 src/remotes/pentabarf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/remotes/pentabarf.py b/src/remotes/pentabarf.py
index 45647da..99eb322 100644
--- a/src/remotes/pentabarf.py
+++ b/src/remotes/pentabarf.py
@@ -79,7 +79,7 @@ def import_pentabarf(xmlstr:str, url:str):
            )
            end = eevent.find('duration').text.split(":")
            end = start + datetime.timedelta(hours=int(end[0]), minutes=int(end[1]))
            evtdate = start.date()
            evtdate = datetime.datetime.strptime(date, "%Y-%m-%d").date()
            room = _get_text(eevent, 'room')
            slug = _get_text(eevent, 'slug')
            title = _get_text(eevent, 'title')
-- 
2.38.5
Details
Message ID
<1772e54009385ed4.32e98d0474f73dd4.85a55300ec3bf783@piccettino>
In-Reply-To
<168953473237.22687.7070646103054085637-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Merged. Thank you!
> From: Edward Betts <edward@4angle.com>
> 
> Fix for events that happen after midnight in UTC showing on the wrong
> day.
> ---
>  src/remotes/pentabarf.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/remotes/pentabarf.py b/src/remotes/pentabarf.py
> index 45647da..99eb322 100644
> --- a/src/remotes/pentabarf.py
> +++ b/src/remotes/pentabarf.py
> @@ -79,7 +79,7 @@ def import_pentabarf(xmlstr:str, url:str):
>              )
>              end = eevent.find('duration').text.split(":")
>              end = start + datetime.timedelta(hours=int(end[0]), minutes=int(end[1]))
> -            evtdate = start.date()
> +            evtdate = datetime.datetime.strptime(date, "%Y-%m-%d").date()
>              room = _get_text(eevent, 'room')
>              slug = _get_text(eevent, 'slug')
>              title = _get_text(eevent, 'title')
Reply to thread Export thread (mbox)