Whenever I try to save a post in the future, the time will detract 2 hours. This seems to be a timezone issue, but I cannot figure out what causes this.
My server timezone is set to Europe/Amsterdam, as well as my WordPress timezone.
If I want to save a post for 18:00 today, it gets saved as 16:00.
Can anyone point me in the right direction as to where to look?
What time zone are you in? Does it happen to be 2 hours apart?
Related
I have a rather strange problem. I'm trying to create URLs for Google Calendar items and everything is working fine, except when I add a timezone, the event start and end times are 5 minutes off. I can't for the life of me figure out what's wrong. Example:
http://www.google.com/calendar/event?action=TEMPLATE&text=Sample+Event&dates=20210511T1400/20210511T1500&ctz=America/New_York&location=&details=&sf=true
As you can you see from the URL, it should be 2PM and 3PM but when you actually go to the page, it's 5 minutes past the hour.
Anyone got any ideas?
Well finally found the answer. I was just missing the seconds from the time in the URL. That was messing it up. For example:
http://www.google.com/calendar/event?action=TEMPLATE&text=Sample+Event&dates=20210511T140000/20210511T150000&ctz=America/New_York&location=&details=&sf=true
I have the following link for a user to create a Google calendar event
https://calendar.google.com/calendar/render?action=TEMPLATE&text=Your+Event+Name&dates=20140127T224000Z/20140320T221500Z&ctz=America/Los_Angeles&details=For+details,+link+here:+http://www.example.com&location=Waldorf+Astoria,+301+Park+Ave+,+New+York,+NY+10022&sf=true&output=xml#eventpage_6
I originally found this out using the example from Link to add to google calendar
The issue I am having is to do with the time part of the URL which is
&dates=20140127T224000Z/20140320T221500Z
to break this down the format for this in which Google uses to determine the start/end date and time is
Ymd\\THi00\\Z
So you understand Google uses GMT as a standard time in the url and converts it correctly according to the users settings in their Google account. For instance (GMT-07:00) Pacific Time
So let's take just the start time of this URL which is
224000 which is Hi00 or Hour:Minutes:Seconds
In my Google calendar, my timezone settings are set to Pacific which is -7. Converting 224000 GMT to -7 Pacific you get 154000 which should be 3:40 PM
Problem is when you click the link, (if you are pacific) it is showing me the start time as 2:40 PM
What's even weirder is the end time which is 221500 shows as 3:15 PM. The end time hour is still the same as the start time but shows 1 hour ahead. I get that Google is probably assuming that I mean 1 hour ahead and makes that change for me, OR by default Google probably adds 1 hour more from the start time automatically.
I am not sure if I am understanding the format Google uses GMT in the URL or there is an issue with my coding and how I am representing that. Anyone have any info on this?
You may want to check this page wherein it discussed how Google Calendar uses time zones. As mentioned,
When you create an event, you'll see it in your local time zone. It will also show up in the local time zones for anyone you invite, even if they're in a different time zone.
And, on Daylight savings time:
Google Calendar uses Coordinated Universal Time (UTC) to help avoid issues with daylight savings time.
When events are created, they're converted into UTC, but you'll always see them in your local time.
If an area switches their time zone, events created before we knew about the change might be in the wrong time zone.
With this, you may want to try the given workarounds in this thread and see if it will help you.
I Need to get the current Eastern time zone.
I am using asp classic. I tried alot but I did not got the solution.
Any one can help me.
I am using
Now()
to get the current value in vb classic but i need current time in Eastern time zone.
I disagree that converting to UTC time is the way to go, precisely because then you get to deal with the headaches of daylight savings time. Instead, figure out what time zone the server is set to, figure out what the offset is from that to Eastern time, and then instead of just Now, use DateAdd('h',3,Now). (Naturally, replace 3 with the correct number if the server is not on the west coast.)
Alex K has the right answer, which he put in the form of a comment. Here it is in the form of an answer:
Get UTC time -> stackoverflow.com/a/11441116/246342 Add the offset (remembering some places will use daylight savings in the summer)
For my apps I try to store all times as UTC to avoid this problem. For some date/time calcs I can get by with the local time zone of the server, such as when I just need to know elapsed time. So then I'm just careful to make sure the server time zone is what I expect in case I ever need to display it. For example, our marketing dept doesn't think having our special offers expire at "midnight UTC" is very user-friendly, so we just say "midnight Central Time" and let people convert in their heads to their local time. Internally I can compare Now to the expiration date of the offer and it works fine.
We have a really strange problem in xpages regarding dates, the Notesdocument we have contain a date field and the value is only a date, there is no time portion.
In the xpage I have specified to display the date as a date/time value. the date display correctly on the webpage but we are now getting reports from users who login at night (around midnight) and see the date as adjusted by one day. if the same people login at daytime the date is correct so this only seem to happend around midnight
I have tried to change my clock on my client to around midnight but that does not reproduce it so I assume this is a server issue.
The domino server have correct date/time and we are using the latest version of Domino
any ideas?
we encountered the same problem recently and, I believe, found a very nice solution.
system treats the pure date as a date in UTC time zone. Date value is automatically converted into server's time zone. So the question is how to prevent conversion?
this code prevents conversion:
<xp:this.converter>
<xp:convertDateTime
type="date"
ignoreUserTimeZone="true"
dateStyle="long"
timeZone="UTC">
</xp:convertDateTime>
</xp:this.converter>
pay attention at "timeZone" attribute.
The issue is related to not having the TimeZone specified in the date / time field. We ran into this just yesterday. If you don't have the TZ specified, it seems to assume UTC and will adjust accordingly. Include the time zone and your field will stop adjusting erroneously.
Perhaps it has to do with this ?
http://www-304.ibm.com/support/docview.wss?uid=swg21508734
I've seen some reports about XPages Dates and TimeZone Issues
I suspect your Domino version was 8.5.3, because there were 2 APAR, LO72278 and LO67745, on similar problems against 8.5.3. Fixpack 3 addresses them.
The root cause is that Lotus Notes allows you to save a "Date" with no time or zone and the Notes server has a default Time Zone setting to interpret these incomplete things called dates. XPages doesn't play by the same rules, and its master Java wants to know what zone you're using, and looks to the system for some clue, and generally will use midnight within some TZ to refer to a "Date". There is a whole region on Stack Overflow on the "how to store/represent a date" topic - [datetime] - since languages and DBMS each have their own approach.
Nice legacy Notes focused article about it.
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/05022009100728PMAGU5MB.htm
XPages article about it
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPagesTimeZones.htm
Too bad they are not totally on the same page, I assume each release gets closer.
I am getting issue with my current WordPress installation.
Whenever anybody posting any comment on a blog, the time is less than 2 hrs of the current time of posting. I have checked the server time and it is showing properly in php and mysql both. But still when each comment posted, the comment_date column of wp_comments table inserted value with 2 hrs subtracted value.
http://en.support.wordpress.com/settings/general-settings/
Timezone is set to Coordinated Universal Time, UTC by default...