timezone

SQL Server Jobs / Schedules - US vs. UK Daylight Savings Adjustment

孤街醉人 提交于 2019-12-12 10:45:31
问题 SQL Server Jobs / Schedules - US vs. UK Daylight Savings Adjustment We have a UK based server which needs to run a SQL Agent Job at 16:30 (US Central time – this may seem strange but it because of the availability of some data). Usually this wouldn’t be a problem because the time difference between the UK and US is 6 hours so we schedule our job for 22:30. But because the UK and US adjust their clocks at different times in March and November for daylight savings, there is a 2 week period when

Why is Calendar returning the wrong hour with the correct time-zone?

谁说胖子不能爱 提交于 2019-12-12 10:37:02
问题 The time and date returned are correct except for the hour, which is 1 hour less than what it should be. I seem to be setting everything that is required to get the correct time and date: - I'm using Calendar.getInstance(), instead of new Date() - I'm setting the timezone of the Calendar instance with Timezone.getTimeZone - I'm using DateFormat and SimpleDateFormat to format the output My timezone is Eastern Standard Time , aka UTC/GMT-5:00 . None of these lines are having any effect: - cal

Convert date from timezone to device local timezone and date

三世轮回 提交于 2019-12-12 10:15:39
问题 How can I convert date with timezone1 to date with device local timezone2? NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"YYYY-MM-dd HH:mm:ss"]; [dateFormat setTimeZone:[NSTimeZone timeZoneWithName:@"Asia/Jerusalem"]]; NSDate *date = [dateFormat dateFromString:timestamp]; then something like: [dateFormat2 setTimeZone:[NSTimeZone localTimeZone]]; date2 = [dateFormat2 dateFromDate:date withOtherTimeZone:zone]; UPDATE: I think I got it. //get source

python time.strftime %z is always zero instead of timezone offset

℡╲_俬逩灬. 提交于 2019-12-12 09:56:25
问题 >>> import time >>> t=1440935442 >>> time.strftime("%Y/%m/%d-%H:%M:%S %z",time.gmtime(t)) '2015/08/30-11:50:42 +0000' >>> time.strftime("%Y/%m/%d-%H:%M:%S %z",time.localtime(t)) '2015/08/30-13:50:42 +0000' The offset stays the same +0000, but I expect '2015/08/30-13:50:42 +0200' The timezone is correct, as the command is interpreting capital %Z as it should >>> time.strftime("%Y/%m/%d-%H:%M:%S %Z",time.localtime(t)) '2015/08/30-13:50:42 CEST' Unix date works like I want $ date -u --date

Upgrading Olson tz database natively implemented in PHP

早过忘川 提交于 2019-12-12 09:41:56
问题 I'm working on a site that makes heavy use of time zones which needs to be on the bleeding edge of the absolute latest tz information available (which I already get through the tz mailing list). What I don't know is how to get the PHP installations running on my development machine and my web host to use more up-to-date tz data instead of the older data already on them. This isn't as simple as just upgrading PHP, since even the newest versions of PHP won't necessarily have the absolute latest

Using TimeZones on website using ASP.Net 3.5 / SQL Server 2005

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 09:23:21
问题 I am trying to determine, how I should implement local time in a web-app. All users are logged in, there are no anonymous users. They will need to see all time-values in their local time. Is this how it should be done? All DateTime values are saved as UTC-time in database Each user has a UTC-Offset value stored in his profile When displaying a datetime-value, I take the value from the database, and apply the users offset. Is this the way to go? Or am I missing something? 回答1: Don't store a

Spark SQL is not converting timezone correctly [duplicate]

二次信任 提交于 2019-12-12 08:30:22
问题 This question already has answers here : Spark Strutured Streaming automatically converts timestamp to local time (3 answers) Closed 11 months ago . Using Scala 2.10.4 and spark 1.5.1 and spark 1.6 sqlContext.sql( """ |select id, |to_date(from_utc_timestamp(from_unixtime(at), 'US/Pacific')), |from_utc_timestamp(from_unixtime(at), 'US/Pacific'), |from_unixtime(at), |to_date(from_unixtime(at)), | at |from events | limit 100 """.stripMargin).collect().foreach(println) Spark-Submit options: -

How to handle time zone difference between server and native android application?

*爱你&永不变心* 提交于 2019-12-12 08:24:09
问题 Suppose that my server located in USA and I live in Russia. We know that they have different time zones. My application getting text( String ) from server. And this text data has Date column in database to keep record date. When I get data, I also get date knowledge. So I can group them by time. First ones at the top and last ones at the bottom. Whatever... I wrote a function to show date value more human-readable such as "13 hours", "9 minutes". Server sends me the date in server's (USA)

How do I display a date with a custom timezone?

若如初见. 提交于 2019-12-12 07:47:09
问题 Lets say I have a string that represents a date that looks like this: "Wed Jul 08 17:08:48 GMT 2009" So I parse that string into a date object like this: DateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy"); Date fromDate = (Date)formatter.parse(fromDateString); That gives me the correct date object. Now I want to display this date as a CDT value. I've tried many things, and I just can't get it to work correctly. There must be a simple method using the DateFormat class

How to change the time zone in Jenkins?

巧了我就是萌 提交于 2019-12-12 07:10:05
问题 I wish to change the time zone of the Jenkins. I have changed the time zone of the Jenkins installed server, but the Jenkins UI shows the different time. I need to set the PST time for Jenkins UI. How can I do it? 回答1: See https://wiki.jenkins-ci.org/display/JENKINS/Change+time+zone. Jenkins should respect the timezone set for java. But you can force Jenkins to use a specific timezone by adding the following to start command of Jenkins: java -Dorg.apache.commons.jelly.tags.fmt.timeZone