Dates in 1Password off by one day when crossing timezones

Options
ooglek
ooglek
Community Member

Most of my computers are in America/New_York time zone. I recently traveled to America/Costa_Rica (equivalent to US/CST, CR does not follow DST).

I entered my Passports on 1P 4.2 on my Mac Pro running Mavericks 10.9.1, entering the birthdate, issued date and expiration date on 4 different passports while in the US on East Coast (EDT) time.

Went to Costa Rica and it was time to check into my flight for the ride home.

Strangely, the Delta iPhone App had all of the dates off by one from the dates I had entered while in the US. I only noticed when Delta prefilled my Passport information and my birthday was listed as the day before my actual birthday.

So I popped open 1Password and noticed that those dates had also changed!!! The Birthdate, issued date and expiration date on all 4 passport entries had drifted back by one day.

I am betting that when I get back to the US that they will all shift back.

The problem is that those dates are, well, kind of important.

I'm guessing those dates entered are using the timezone at the time of entry.

To prevent such things, dates that should not ever shift should be marked as such. For Example, if I add a date/time while in America/New_York, 1Password should show the time zone it was initially entered as and not localize it as I travel. It should probably be stored in GMT and always displayed in GMT, regardless of localized timezone.

Anyway, The Delta iOS App was the precipitating cause for this bug post. Would love to hear details of how dates in 1P are stored and localized as the computer (and iOS) apps travel through timezones. Dates/Times should be immutable and not localized in my humble developer opinion. I also think all servers should use UTC/GMT always and use software to localize for users, but not everyone agrees. :-)

Beckman

Comments

  • hawkmoth
    hawkmoth
    Community Member
    Options

    That bug was leading to some other behavior like duplicated fields with different dates in individual 1Password records at one time. I think that particular issue was squashed a few versions ago, but I haven't had another occasion to test it. It sounds from your report that it needs more attention!

  • ooglek
    ooglek
    Community Member
    Options

    It's not a huge bug, and I can understand how it could be made. Not everyone thinks about time and timezones, nor writes unit tests to test them. But it could become problematic if someone doesn't notice the change.

    When you want something to be immutable, you have to use the same time zone regardless of the localized time zone. It's a common mistake. You enter the date while in America/New_York time zone, so you store it how you've stored them all -- as an NSDate. It's automatically localized by the system, so you don't have to muck with it.

    Except that it should be stored with a time zone, especially for birthdates. In fact, I can't think of a time/date in 1Password that should be localized. 1Password should assume all entries are entered in GMT, and displayed in GMT, regardless of current TZ. Just because 1P doesn't show the time, I'm guessing it is stored.

    Would love a 1P rep to comment!

  • hawkmoth
    hawkmoth
    Community Member
    Options

    I'd like to see a comment from the officials too. And I can't see any reason why ant of the dates I store in 1P should be time zone sensitive at all. Calendars are a different matter, but I can never decide how to handle those when I change time zones.

  • ooglek
    ooglek
    Community Member
    Options

    Ack, another day, no response. I think I'll just keep bumping it until someone takes a look. The word of the day is IMMUTABLE as it relates to dates. :))

  • Jasper
    Options

    Hi @ooglek,

    You'll be happy to hear that this bug was fixed in version 4.3.1.BETA-4. :)

    From release notes:

    Fixed problem where date values were shifting when the time zone changed.

    It shouldn't be too much longer before 4.3.1 is released.

  • ooglek
    ooglek
    Community Member
    Options

    Eeeeeeexcellent, JasperP! Thank you for finding and squashing the crud out of that one!! What happens for dates already put in 1Password when the fix goes in? Might they shift again?

  • Megan
    Megan
    1Password Alumni
    Options

    Hi @ooglek,

    Our developers are currently looking at how to implement this fix across all platforms to ensure that dates are properly respected. :)

  • Andrey Brindeyev
    Andrey Brindeyev
    Community Member
    Options

    I'm still experiencing this bug. I have 1Password 4.4.1 from Agile Web Store & 1Password 5.0.1 on iOS 8. All passport dates are 1 day back. I double-checked that 1Password were in synchronized state both on Mac & iOS (I'm using Dropbox).

  • Megan
    Megan
    1Password Alumni
    Options

    Hi Andrey Brindeyev,

    I'm sorry to hear that you're running into this issue. We've been hearing a few reports of this one since the release of 1Password 5 for iOS, and our developers are looking into where things are getting tangled up. Thanks for bringing this to our attention - we'll do what we can to get this sorted out just as soon as possible!

    ref: OPI-1314

This discussion has been closed.