Page MenuHomePhabricator

UploadWizard ignores time zones in creation date, warns about its own suggested "today"
Closed, ResolvedPublic

Description

The creation date specified during the upload of a file is not linked to any specific time zone. However, UploadWizard ignores the existence of time zones with positive UTC offsets.

Problem: If I am in UTC+02 and it is less than 2 hours after midnight, the calendar widget correctly suggests "today" by framing the day in the month calendar and I can choose that date. However, when I submit the form, I get a warning saying "The date that you selected is in the future." The probable cause is that this date has not yet come in the UTC time zone. The date may, however, be valid in some or all of the time zones that are ahead of UTC.

Suggested solution: Do not issue a warning if specified date is a current or past date in any place of the world – simplified, it currently means use UTC+14:00 for checking.

Observation: Properly defining my time zone in Preferences - Appearance does not make any difference.

Event Timeline

Blahma created this task.Jul 8 2016, 11:28 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptJul 8 2016, 11:28 PM
Restricted Application added subscribers: Zppix, Steinsplitter, Aklapper. · View Herald Transcript

Haha, whoops. Luckily this is just a warning and can be ignored.

Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 12 2016, 6:12 PM
Blahma renamed this task from UploadWizard ignores time zones in creation date, complains on its own suggested "today" to UploadWizard ignores time zones in creation date, warns about its own suggested "today".Jul 12 2016, 7:08 PM
Blahma updated the task description. (Show Details)
matmarex claimed this task.Jul 14 2016, 2:48 PM

Do not issue a warning if specified date is a current or past date in any place of the world – simplified, it currently means use UTC+14:00 for checking.

This does look like the best solution. We could also easily fix the check to use the user's timezone, but we preload the date from EXIF data and the user and the camera could be in different timezones ;)

Change 298983 had a related patch set uploaded (by Bartosz Dziewoński):
uw.DateDetailsWidget: Treat date input as UTC 14 rather than UTC to avoid false warnings

https://gerrit.wikimedia.org/r/298983

Change 298983 merged by jenkins-bot:
uw.DateDetailsWidget: Treat date input as UTC 14 rather than UTC to avoid false warnings

https://gerrit.wikimedia.org/r/298983

matmarex triaged this task as Normal priority.Jul 18 2016, 8:04 PM
matmarex closed this task as Resolved.Jul 18 2016, 8:19 PM
matmarex removed a project: Patch-For-Review.