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

Restricted Application added subscribers: Zppix, Steinsplitter, Aklapper. · View Herald Transcript

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

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)

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 Medium priority.Jul 18 2016, 8:04 PM