Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

SeedVault timestamp in filename uses UTC instead of local time #679

Closed
UmbahaSpodPaha opened this issue Nov 30, 2018 · 1 comment · Fixed by #1178
Closed

SeedVault timestamp in filename uses UTC instead of local time #679

UmbahaSpodPaha opened this issue Nov 30, 2018 · 1 comment · Fixed by #1178
Assignees
Labels
C - Desktop C - Mobile E - Functional Epic - Relating to how a feature works L - Has PR P4 - Low Priority - This can wait T - Enhancement New feature or request

Comments

@UmbahaSpodPaha
Copy link

UmbahaSpodPaha commented Nov 30, 2018

Bug description

Exported SeedVault filenames are mismatched by 1hour both for Desktop and Mobile.

Android:
screenshot_20181130-215737_my files

PC:
time-mismatch-seedvault export

Environment Specs

Desktop: Windows 7 x64
Samsung Galaxy S9+: Android 8.0

  • Trinity version:
    0.4.3 desktop
    0.5.1 (28) mobile

Expected behaviour

Time should match in SeedVault filenames.

Am I planning to do it myself with a PR?

No

@rajivshah3 rajivshah3 added C - Desktop T - Bug Type - Bug: Something isn't working C - Mobile E - Functional Epic - Relating to how a feature works and removed T - Bug Type - Bug: Something isn't working labels Dec 1, 2018
@rajivshah3
Copy link
Member

This isn't actually a bug. The code is doing what it's supposed to, but we probably shouldn't do it this way :trollface:

const path =
(isAndroid ? RNFetchBlob.fs.dirs.DownloadDir : RNFetchBlob.fs.dirs.CacheDir) +
`/${prefix}${now
.toISOString()
.slice(0, 16)
.replace(/[-:]/g, '')
.replace('T', '-')}.kdbx`;

toISOString() will return the timestamp with UTC time, so it could be different from your local time. We should be using the local time though since we do that in other parts of the app

@rajivshah3 rajivshah3 self-assigned this Dec 3, 2018
@rajivshah3 rajivshah3 added the P4 - Low Priority - This can wait label Dec 3, 2018
@rajivshah3 rajivshah3 changed the title Mobile & Desktop - SeedVault timestamp in filename mismatch by 1h SeedVault timestamp in filename uses UTC instead of local time Dec 3, 2018
@rajivshah3 rajivshah3 added the T - Enhancement New feature or request label Dec 3, 2018
@laumair laumair assigned laumair and unassigned rajivshah3 Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C - Desktop C - Mobile E - Functional Epic - Relating to how a feature works L - Has PR P4 - Low Priority - This can wait T - Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants