ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.72k stars 1.07k forks source link

Inset time into spreadsheets sometimes is a day ahead #2446

Open ranger135xp opened 11 months ago

ranger135xp commented 11 months ago

This issue is unique.

Operating System

Windows 10 / 8.1 / 7

Version information

7.4.1.36

Expected Behavior

Expected when hitting hotkey CTRL+; that the date inserted matches the system clock (today's date).

Actual Behavior

Not sure what times of the day this begins, but usually in the evening/night hours (8PM+) the date insert will be 1 day ahead. My timezone is Eastern so typically UTC -5. Insert time (CTRL+SHIFt+;) inserts the correct time, so it's odd that the date insert would be incorrect.

Reproduction Steps

  1. Open a new spreadsheet
  2. Insert date with CTRL+; to insert date
  3. Try past 8pm EST/DST

Additional information

N/A

rsnegirev commented 11 months ago

Hi @ranger135xp

I have UTC +4 timezone and 1PM right now, so I'll try to reproduce that in 8PM+ and send you feedback.

ranger135xp commented 11 months ago

Hi @rsnegirev If I suspect the function isn't using the current timezone, I would assume - as a test - that the function is using UTC-0, so for you, you'd need to test at 1, 2, or 3am and see if it gives you yesterday's date.

Also, my initial description isn't clear that I'm currently under "daylight savings", so my timezone is currently UTC-4 where it's normally UTC-5. I should test it closer to 6:59PM and then at 7:00PM to see if it works, then the same for 7:59 and 8:00PM.

ranger135xp commented 11 months ago

7:00 PM put in the proper day. 7:59 PM was the proper day. 8:00 PM inserted the next day's date. This proves my theory that it's using UTC+0 instead of my timezone of UTC-4.

Please investigate in the code for the CTRL+; hotkey.

rsnegirev commented 10 months ago

@ranger135xp, sorry for a long answer

I can confirm this is the bug number 64841.

Thank you for the report!

We'll post any updates here in this issue.

Also moving this issue to DocumentServer repo, since it's our base product and problem actual there too.