Project

General

Profile

Actions

Defect #5091

closed

User timezone is not honored everywhere

Added by Joshua Kifer over 14 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
2010-03-16
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

As the areas in question are only providing the Date (not the Time), I was only able to notice when my local time was a day off from UTC.

It is honored for:
  • activity
  • repository (git)
  • files
It is not honored for:
  • issues/XX (issue detail)
  • issues/calendar
  • roadmap

Files

i18n.rb.patch (1.59 KB) i18n.rb.patch don't apply this, it doesn't work Wang Congming, 2010-05-12 10:22

Related issues

Related to Redmine - Defect #1048: Day grouping on Activity view ignores user's time zoneClosed2008-04-12

Actions
Actions #1

Updated by Joshua Kifer over 14 years ago

In lib/i18n.rb, format_date is not using User.current.time_zone like format_time does.

Actions #2

Updated by Alain Alain091 over 14 years ago

I suggest the following patch but it is not fully tested and is delivered AS IS.

    def format_date(date)
      return nil unless date
      time = date.to_time
      zone = User.current.time_zone
      local = zone ? time.in_time_zone(zone) : (time.utc? ? time.localtime : time)     
      Setting.date_format.blank? ? ::I18n.l(local.to_date) : local.to_date.strftime(Setting.date_format)
    end

See also my other patch for #5378

Actions #3

Updated by Wang Congming over 14 years ago

Hi Alain,

I modified i18n.rb as you specified here and in #5378, now the patch looks like as my attachment. However, it doesn't work. I am not a ruby developer, maybe I did something wrong, thanks for any suggestion.

We have a server, running Debian Squeeze + redmine trunk + git. Timezone of this server and our desktops are all UTC+8. Everytime, we (git) push a file to server, and check immediately, redmine says the file is modified 8 hours ago.

Actions #4

Updated by Alain Alain091 over 14 years ago

Are you talking about the zone settings in the redmine profil settings ?

Actions #5

Updated by Wang Congming over 14 years ago

Everywhere. Include: system timezone setting of our server, system timezone setting of all our desktops, and the timezone setting in redmine profile. They are all UTC+8.

However, if I (git) push a file from my desktop to our server, and check redmine's repository immediately, redmine says this file is modified 8 hours ago.

Actions #6

Updated by Daniel Felix almost 12 years ago

  • Status changed from New to Needs feedback

Any news on this? Is this still true?

I've seen some changes in some methods which correct the timezone support, but I'm not sure if they are consistently corrected in every model/controller.

Actions #7

Updated by Toshi MARUYAMA almost 8 years ago

  • Status changed from Needs feedback to Closed

This issue is too old.
Please create new issue if you still have problem.

Actions

Also available in: Atom PDF