Project

General

Profile

Actions

Bug #6415

closed

Date and Datetime still not offsetting entirely accurately

Added by krileon about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
05 January 2017
Due date:
% Done:

100%

Estimated time:

Description

If both the user and site are set to UTC then selection should be made in UTC, but it's still being made in local offset to UTC. This causes re-display to break. The selection should always either be the timezone set in the users profile OR the timezone of the site. Using browser timezone offset to UTC is causing too many inconsistencies.

https://www.joomlapolis.com/forum/153-professional-member-support/235663-date-field-error?start=6#289783

Actions #1

Updated by krileon about 7 years ago

This looks like a problem with momentjs. Even though the timezone has been set to UTC calling .utc() causes a double offset.

Actions #2

Updated by krileon about 7 years ago

.tz( TIMEZONE ) needs to be skipped if TIMEZONE = UTC. In addition to this .utc() needs to be skipped and only used if we've offset to local otherwise we're already in UTC (e.g. use exactly what is selected). The .utc() called when unnecessary is probably what is causing the Date field bugs as well.

Actions #3

Updated by krileon about 7 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Fixed in MR !1221

Actions #4

Updated by krileon about 7 years ago

  • Target version changed from CB 2.2 to CB 2.1.1
Actions #5

Updated by beat about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF