timezone

MS Outlook incorrectly interprets ICS files in local time: daylight savings time overcorrection

久未见 提交于 2020-01-03 10:47:15
问题 Does anyone know a way in an ICS file to specify that all times are written in the local time at the location? I thought that leaving the 'Z' off the end of times, and using the TZID="America/Denver" (for example) in DTSTART and DTEND lines accomplished this, but MS Outlook assumes that all times are in the location's standard time. My events all take daylight savings time into account. Do I have to rewrite the app so times are in UTC? Do I have to include a block at the beginning that

How can I get the “current” IANA time zone abbreviation throughout time in ICU4J?

允我心安 提交于 2020-01-03 07:19:09
问题 I'm currently trying to write a suite of time zone validation programs to see whether various platforms interpret the IANA time zone data. The output format I'm targeting includes the abbreviation in effect for a particular time - such as "BST" for "British Summer Time", or "PST" for "Pacific Standard Time". On most platforms, this is easy - but ICU4J seems not to be working, oddly. According to the SimpleDateFormat documentation I should be able to use a pattern of "zzz" to get what I'm

Python pytz timezone conversion returns values that differ from timezone offset for different dates

浪子不回头ぞ 提交于 2020-01-03 02:24:12
问题 I was trying to convert US/Eastern timezone dates to UTC to upload to a website that only accepts UTC times, but displays time in local timezone. I have the following code example where when I convert a recent date, there is no issue with the offset (5:00 or 4:00), but when I convert a date such as 1900-01-01, the offset becomes something around 4:56 etc. import pytz import tzlocal from datetime import datetime usest=tzlocal.get_localzone()#My local zone is US/Eastern. I could directly use

How to get IST time zone in Android

烈酒焚心 提交于 2020-01-03 02:00:49
问题 I am new to android application development , I am developing an app that is going to run in india only, I want to get the time of asia/kolkata timezone without using "joda" library I used the following code but i didn't get expected output Calendar cal = Calendar.getInstance(); TimeZone tz = cal.getTimeZone(); Log.d("Time zone","="+tz.getDisplayName()); I want the time in hh:mm:ss format 回答1: import java.util.Calendar; import java.util.TimeZone; public class Main { public static void main

Node.js and MongoDB Time Zone Issue UTC not being converted correctly by driver?

ぐ巨炮叔叔 提交于 2020-01-02 23:05:20
问题 I have a strange thing occurring and I hope someone can point out what i am missing. In MongoDB I have a field DT that is of Type Date An example of what the date looks like in MongoDB is 2014-10-01 10:28:04.329-04:00 When I query MongoDB from Node.js using MongoClient, Node.js is returning this: 2014-10-01T14:28:04.329Z As i understand it the driver is suppose to convert UTC to local time. In my case it should be Eastern Time (EDT). Why would Node be adding 4 hours instead? I am loading the

How to calculate eastern time using Javascript Date object?

血红的双手。 提交于 2020-01-02 08:40:09
问题 I'm working on a personal project involving Javascript, and as part of that project, I want to grab the current date (including time) and display it accordingly. No big deal right? Well, the deal is that I want to return the time & date in Eastern Daylight TIme , no matter where in the world the IP is. If this is not possible, what alternative methods do you suggest? Does php have this functionality? I could write a simple php script that takes a date and converts it, but I want to keep this

How to calculate eastern time using Javascript Date object?

久未见 提交于 2020-01-02 08:39:08
问题 I'm working on a personal project involving Javascript, and as part of that project, I want to grab the current date (including time) and display it accordingly. No big deal right? Well, the deal is that I want to return the time & date in Eastern Daylight TIme , no matter where in the world the IP is. If this is not possible, what alternative methods do you suggest? Does php have this functionality? I could write a simple php script that takes a date and converts it, but I want to keep this

Change mysql timezone from phpMyAdmin

廉价感情. 提交于 2020-01-02 06:00:48
问题 I am trying to change the timezone of my database. I am on shared server and database support guys can not change it for me only. Time zone is currently +1:00 I want it as +05:30 . I searched and tried following but nothing worked. date_default_timezone_set('timezone_name'); Added to my index.php file. mysql> SET GLOBAL time_zone = 'timezone_name'; It says access restricted. SET time_zone = timezone_name Query run now row affected. My site is hosted on site-ground us server. 回答1: As I am on

python-tz am I wrong or it's a bug

♀尐吖头ヾ 提交于 2020-01-02 05:57:51
问题 It's a bit weird it seems that when I want to get a timezone for Europe/Paris with pytz it gets me to the PMT timezone instead of GMT+1 when it seems to work for Europe/Berlin. Not clear ? Well look at this snippet : #!/usr/bin/python import os import datetime from pytz.tzfile import build_tzinfo base='/usr/share/zoneinfo/' tz = build_tzinfo('Europe/Paris', open(os.path.join(base,'Europe','Paris'), 'rb')) fmt = '%Y-%m-%d %H:%M:%S %Z%z' print datetime.datetime(2009, 01, 30, 9, 00, tzinfo=tz)

rails // query by timezone during daytime

烂漫一生 提交于 2020-01-02 05:26:11
问题 Not that confident when it comes to use timezones, looking for some help on this one I have a cron job that check users every once in a while, which call a rake task. Within this rake task, I query users and sent each an email base on conditions. I have the timezone info for each users. I'd like to have a query on those users that would only return the users that are currently in their daytime How would one achieve that ? Best 回答1: This depends on a few different things, but I'll go by how my