omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. j1wan

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 1
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    j1wan

    @j1wan

    0
    Reputation
    615
    Profile views
    1
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    j1wan Unfollow Follow

    Latest posts made by j1wan

    • Bug report: strange due date in reminders module (in GMT+9)

      I live in Seoul, South Korea which corresponds to GMT+9 (Asia/Seoul). Working with the reminders module, I found very strange due date behavior. If I run the following Pythonista 3 script, the second Reminder item falls into Tomorrow, like the following image. Actually, in GMT+9, before 15:00 is classified as today and after 15:00 is classified as tomorrow. And removing the second reminder make Reminders app to crash.

      import reminders, webbrowser
      from datetime import datetime, timedelta
      
      r = reminders.Reminder()
      a = reminders.Alarm()
      r.due_date = a.date = datetime.now().replace(hour=14)
      r.alarms = [a]
      r.title = 'GMT+9 Today 14:xx:xx'
      r.save()
      
      r = reminders.Reminder()
      a = reminders.Alarm()
      r.due_date = a.date = datetime.now().replace(hour=15)
      r.alarms = [a]
      r.title = 'GMT+9 Today 15:xx:xx'
      r.save()
      
      webbrowser.open('x-apple-reminder://')
      

      the image

      .
      .

      However, in other GMT, for example in New York with GMT-4, the date is correct. If I change my iPhone's timezone to New York and run the following script, the date is correct.

      import reminders, webbrowser
      from datetime import datetime, timedelta
      
      r = reminders.Reminder()
      a = reminders.Alarm()
      r.due_date = a.date = datetime.now().replace(hour=0)
      r.alarms = [a]
      r.title = 'GMT-4 Today 00:xx:xx'
      r.save()
      
      r = reminders.Reminder()
      a = reminders.Alarm()
      r.due_date = a.date = datetime.now().replace(hour=23)
      r.alarms = [a]
      r.title = 'GMT-4 Today 23:xx:xx'
      r.save()
      
      webbrowser.open('x-apple-reminder://')
      

      the result

      .
      .
      .

      I couldn't check all the timezones, but it seems obvious that at least 'Asia/Seoul' timezone has such problems. Can you fix this?

      posted in Pythonista
      j1wan
      j1wan