Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Q
qtbase
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Labels
  • Merge Requests 6
    • Merge Requests 6
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Jobs
  • Commits
  • mer-core
  • qtbase
  • Merge Requests
  • !44

Merged
Opened May 20, 2019 by Damien Caliste@dcaliste
  • Report abuse
Report abuse

[qtbase] Detect system time zone from linked symlinks.

  • Overview 12
  • Commits 1
  • Changes 1

Run qDebug() << QTimeZone::systemTimeZoneId(); and enjoy the wonderful return value : timed/localtime !

This comes from the fact that /etc/localtime is a symlink to /var/lib/timed/localtime which is itself a symlink to /usr/share/zoneinfo/Europe/Paris, but the routine to read the /etc/localtime symlink is waiting for one symlink only.

This is creating a real mess when doing for instance: QDateTime date(QDate(2019, 05, 20), QTime(12, 00, 00), Qt::LocalTime); QDateTime old(QDate(2010, 01, 01), QTime(08, 00, 00), Qt::Utc); qDebug() << old.toZone(date); because date has no time zone (date.timeZone() is returning an invalid time zone, while it should return the system time zone, which is not supposed to be invalid). This kind of code is used everywhere in the new upstream kcalcore…

@pvuorela and @chriadam any remarks ? Should I propose it upstream also or is it very Mer specific ?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: mer-core/qtbase!44

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.