timezone

system time is different than apache timestamp --?

爷,独闯天下 提交于 2020-01-02 05:06:11
问题 Im on a development server. When i do this in php: echo date('r',time()); response: Tue, 01 Jun 2010 18:10:32 -0400 However, my computer's time is 17:10:32 (im on GMT -5). Where do i configure my apache/php to change this setting? i've looked in php.ini and httpd.conf already. Thanks 回答1: Edit your php.ini file and add the following code in the Date section [Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = America/Guayaquil That

Daylight Saving Time start and end dates in Ruby/Rails

主宰稳场 提交于 2020-01-02 04:36:29
问题 I'm working on a Rails app where I need to find the Daylight Saving Time start and end dates given a specific offset or timezone. I basically save in my database the timezone offset received from a user's browser( "+3" , "-5" ) and I want to modify it when it changes because of daylight saving time. I know Time instance variables have the dst? and isdst methods which return true or false if the date stored in them is in the daylight saving time or not. > Time.new.isdst => true But using this

Peculiar time zone handling in a Postgres database

佐手、 提交于 2020-01-02 04:27:24
问题 My environment I'm in Paris, France ( UTC+1 or CET ). It's 12am ( 00:00 ), we're on the 25th of November 2016 . My Postgres database is hosted on Amazon Web Services (AWS RDS) in the eu-west-1 region. The issue Querying for the current_date (or current_time ) with a specific time zone set seems to deliver results that aren't consistent with... my beliefs. In particular, querying for the current_date yields a different result when using the CET time zone or the UTC+1 one. Example SET TIME ZONE

Converting Microsoft Timezone to standards timezone data in rails

我与影子孤独终老i 提交于 2020-01-02 03:45:08
问题 I have a rails app that connects to a SQL Server DB, and there's a windows desktop app that connects to the same DB. The Windows app is using the Microsoft windows timezone database so I get a timezone name like Pacific Daylight Time . In rails, the ActiveSupport::TimeZone class gives us a mapping hash where the key would be like Pacific Time (US & Canada) and the value would be like America/Los_Angeles . Is there anything already out there that will convert the windows format to the

tzset and daylight global variable interpretation in time.h

邮差的信 提交于 2020-01-02 03:32:08
问题 In the time.h header for the daylight global variable it says: "This variable has a nonzero value if Daylight Saving Time rules apply. A nonzero value does not necessarily mean that Daylight Saving Time is now in effect; it means only that Daylight Saving Time is sometimes in effect." Now I've noticed that in both Solaris 11.2 and Linux the "daylight" variable is being set to 1, even though my time-zone does not use daylight savings at all (Australia/Brisbane). Sample code confirms this, if I

moment.js, timezones and daylight savings

北战南征 提交于 2020-01-02 02:01:35
问题 I return a list of UTC dates/times from a .Net service, formatted like so: "2013-07-09 19:48:07 +00:00". On the client, I convert each of these string values into a corresponding UTC-based moment, like so var fooUtc = new moment.utc(serverDateTimeString) On the page, there is a droop-down containing a list of time-zones that the user can change. These are tied to a collection of time-zone objects like the following: { id: "Central Standard Time", label: "(UTC-06:00) Central Time (US & Canada)

moment.js, timezones and daylight savings

南楼画角 提交于 2020-01-02 02:00:05
问题 I return a list of UTC dates/times from a .Net service, formatted like so: "2013-07-09 19:48:07 +00:00". On the client, I convert each of these string values into a corresponding UTC-based moment, like so var fooUtc = new moment.utc(serverDateTimeString) On the page, there is a droop-down containing a list of time-zones that the user can change. These are tied to a collection of time-zone objects like the following: { id: "Central Standard Time", label: "(UTC-06:00) Central Time (US & Canada)

How can I change the time zone in Fabric? [duplicate]

北战南征 提交于 2020-01-02 00:54:20
问题 This question already has an answer here : How do you set the time zone in Crashlytics? (1 answer) Closed 2 years ago . Can I change the time zone in Fabric? Fabric got the UTC, but we located in other time zone. So when we checked the data in Fabric, we would be confused by the time. UTC time zone 回答1: Ah, currently I think there is not a way to change the timezone cause all the way to change timezone are based on the UTC. 来源: https://stackoverflow.com/questions/43338481/how-can-i-change-the

Azure now returns invalid value of “Coordinated Universal Time” for TimeZoneInfo.Local.Id instead of “UTC”? Why?

我的梦境 提交于 2020-01-02 00:47:23
问题 It appears starting March 7 that Azure servers in the Southeast Asia region had a patch applied which changed the behavior of TimeZoneInfo in .NET. Setting my local machine to "(UTC) Coordinated Universal Time", then running the following code yields "UTC": namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine(TimeZoneInfo.Local.Id); Console.ReadLine(); } } } Remoting into one of our Azure instances and running this same application yields the

Get the difference between a server side time and client side time and display it [duplicate]

强颜欢笑 提交于 2020-01-01 17:11:02
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to sync a javascript countdown with server time How can I get the to calculate the difference between the server side time and the client side time and then display it in my view , which is a PHP page . Let me make this a bit clear. I have a time data for a particular cricket match to start which is stored in the database . Now, I want to display the difference between this time and the time in the client