changing timezone of ics file without changing appointments time - calendar

I have a little issue,
I recently moved to a different time zone and want to change my google calendar to this current time zone, the problem is that when i do it, all the past appointments are changing to the new time zone,.,. is there a way to change the time zone but keep all the times of the appointments already made with the old time zone intact ?
mayb through exporting ics file, edit it somehow and import it again after changing the primary timezone in google cal ?
i made a temporary calendar with the same old time zone for experimenting, and an event at 12pm in that time zone.
it looks like that :
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:test
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTART:20230206T110000Z
DTEND:20230206T120000Z
DTSTAMP:20230206T184148Z
UID:3dd1htud1ako0du0f71o7smbfl#google.com
CREATED:20230206T182629Z
DESCRIPTION:
LAST-MODIFIED:20230206T182738Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:TEST
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
Now i basically like to keep the same times of the appointment but change the time zone to PST.
when i try it, i get the appointment at 3am.
Is there a way to do it ?
Best regards,
and thanks a lot for the time
I tried changing the :
X-WR-TIMEZONE:Europe/Berlin
to PST time but it didn't work

Thank you so much, that's amazing !
So basically the best way is to export the calendar and run this script over this file and then import it back to a new calendar ?
Could you assist a bit with the process?
I am a bit lost with my limited knowledge..
Thank you so much for your time !

Related

react big calendar display timezone

I want to display the time zone in the calendar edge, it will be like that:
GMT+x, do you have any idea if that's possible?
thank you
First, you would want the latest (0.36.0) version of RBC, which includes timezone support when using the momentLocalizer of the new luxonLocalizer. Second, you cannot currently override the internal TimeGutter component. You would have to replicate all of the views that use TimeGrid and copy over code to write that in yourself.

Adjusting the time zone when using momentJs with React

I am fetching a datetime value from the back end and I use the following line of code to get the time apart from the date :
{moment(element.dateTime).format('h:mm:ss a')}
I just want to know how to adjust the time zone in the code above to be the same as my country's time zone. Is there a way to achieve this?
Thanks in advance.
Moment by default will parse the date to your local computer. https://momentjs.com/guides/#/parsing/local-utc-zone/
You can use the utcOffset method as below, it takes the GMT Offset value. Change '+05:30' to whatever value you want
{moment.utc(element.dateTime).utcOffset("+05:30").format('h:mm:ss a')}
Also, Moment by default parses the date to your local timezone.
You can also use moment-timezone for timezone purposes, it asks for timezone name instead of gmtOffset. If you wish to use format method of moment though, there are certain limitations to it.
Moment Timezone

Logic App - CurrentTime - how to select time only (hh:mm:ss)

When using CurrentTime in logic apps, it gives the full date/time value like 2020-06-14T20:16:49.0131751Z
How can I select the time only Like 20:16:49?
The reason: I want to use CurrentTime in a condition to do actions within certain time windows.
For example: if time current time is greater than 08:00:00 & less that 23:00:00 --> do action.
You can just use the formatDateTime() function in logic app to format your CurrentTime, please refer to my logic app below:
The first expression(utcNow) is:
utcNow()
The second expression(formatDateTime) is:
formatDateTime(variables('CurrentTime'), 'HH:mm:ss')
Hope it helps~
Make a call to an api that provides the time. For example: http://worldclockapi.com/

AngularJs Date filter and 1970-01-01 returns 1969-12-31?

I'm not quite sure how to set the timezone in angularjs for the date filter, which converts 1970-01-01 to 1969-12-31. I've seen this post, which explains the same problem in Java, but not sure how to approach it in AngularJs - any clues?
The JavaScript date is based on a time value that is milliseconds since midnight 01 January, 1970 UTC. A day holds 86,400,000 milliseconds. The JavaScript Date object range is -100,000,000 days to 100,000,000 days relative to 01 January, 1970 UTC.
source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
JavaScript Date type does not have timezone support* you need to use either ISO 8601 format or send timestamp in UTC.
You can also use a library like timezone-js or moment.js
The angular developer guide says this about timezones:
The Angular datetime filter uses the time zone settings of the browser. The same application will show different time information depending on the time zone settings of the computer that the application is running on. Neither JavaScript nor Angular currently supports displaying the date with a timezone specified by the developer.
You can make your own filter to use a specific timezone. Here is a simple one using moment.js to parse 19700101 with the GMT timezone:
app.filter('GMT', function() {
return function(input) {
return moment(input + ' +0000', "YYYYMMDD").format('MMM DD, YYYY');
};
});
Here is a demo: http://plnkr.co/l5zd9Z1tli2NLmgPTWhJ
Thanks everyone for participating.
After quite a bit of time trying to find an easy way to resolve the problem I've found the solution - by simply using Date and one of it's methods:
new Date(date).toISOString();
That does the job and is super short :)

How to set date to default time zone

I would like to set date to default time zone. At this moment my date looks like this: 2013-04-08T22:00:00 +02:00. I need to set my date to +00:00.
I tried to get the offset of my date and I received -120. Is it possible to set time offset? Are there maybe any better solutions?
Anybody an idea?
I'm using EXT JS.
JavaScript's Date object is bound to the time zone of the computer itself. There is no way to change the zone offset programmatically to an arbitrary value.
There is some work going on to add this functionality to the Moment.js library, but it is still in progress.
If you are just looking to get the time at UTC in ISO format, you can use .toISOString()
If you are speaking about code that is specific to the Ext.Date object from ExtJS, please edit your question and post some sample code so we can get a better idea of what you are talking about. Thanks.

Resources