Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeRow Not Using Correct TimeZone #2259

Open
RSady opened this issue Jul 19, 2024 · 0 comments
Open

TimeRow Not Using Correct TimeZone #2259

RSady opened this issue Jul 19, 2024 · 0 comments

Comments

@RSady
Copy link

RSady commented Jul 19, 2024

I'm creating two separate rows...a TimeRow and a ButtonRow. On the button tap I set the TimeRow value to Date(). The date displays but it's always one hour behind my current time zone. I'm in EST, and it's formatting to be displayed in CST. I've checked the actual Date() value and it's correct.

<<< TimeRow(CellTags.time, { row in
    row.title = "Time"
})
        
<<< ButtonRow(CellTags.timeButton, { row in
    row.title = "Set Time to Now + 2 Min"
}).onCellSelection({ [weak self] cell, row in
    guard let self else { return }
    (form.rowBy(tag: CellTags.time) as? TimeRow)?.value = Date()
    (form.rowBy(tag: CellTags.time) as? TimeRow)?.updateCell()
})

When printing the time out, in the .onChange() in the TimeRow, I see this...
Optional(2024-07-19 21:46:07 +0000)

Am I missing something here? I've tried setting the cells default dateFormatters timeZone and Locale and nothing changes.

Simulator Screenshot - iPhone 15 Pro Max - 2024-07-19 at 17 47 15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant