Questions tagged [timezone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

Apex - Very basic question about date/time

I have some basic questions about the date/time fields in Salesforce. I know Salesforce stores the date and time fields in GMT format in the object when a record is created or updated and also ...
user avatar
0 votes
1 answer
40 views

How to convert time to currentuser timezone?

I have datetime field which is coming from api in the below format . I want to store the value in my custom field Response : { time :'2022-06-23T14:00:00+05.30' timezone:'Asia/Kolkata' } I have tried ...
user avatar
0 votes
1 answer
55 views

TimeZone Conversion

We have a simple intake form with the following attributes. So you can think of the object records would be as follows: ID Military Time Time Zone Add Days (from today's date) 1 0700 America/Chicago ...
user avatar
  • 372
0 votes
0 answers
44 views

lightning-input-field with time type not applying gmt offset when saving

I have a lightning-record-edit-form which is rendering a lightning-input-field that happens to be of type Time. The input renders correctly, however when I save the form, the offset from my timezone ...
user avatar
0 votes
1 answer
26 views

Aura Component get time from Server as opposed to JavaScript/Client Side/Browser Time?

We have an intake form built using Aura Components and its a simple form. The submit button on the aura component is enabled or disabled depending on what time it is. Basically, they are not allowed ...
user avatar
  • 372
0 votes
0 answers
25 views

Journey Builder Local Time Sends

I'm currently testing the capabilities of sending out emails to customers globally but at specific local times per their time zones. I followed the article below in an attempt to complete this however ...
user avatar
0 votes
0 answers
26 views

Time Zone Issue - How to properly auto populate a date/time field [duplicate]

I have created a custom action that sets a date/time field to "NOW()" when the user hits save. The user is in PST time zone. The user hits save, the date/time field is updated to 1:30PM for ...
user avatar
  • 49
0 votes
0 answers
31 views

Derive formula for timezone on a datetime value

Is it possible to create a text formula that can derive the datetime for a specific timezone? For example, if you have an activity record with a due date that you want to send a sms text to the ...
user avatar
  • 2,327
-1 votes
1 answer
192 views

Date/Timezone Issue in web service integration

I have an apex class making a callout to an external REST API and gets a response as shown below. [ { "externalGUID": "0d872ca4-45fc-45f9-97f7-0c4f8068ea79", "...
user avatar
-1 votes
2 answers
241 views

Convert String to a DateTime Format (GMT) - Return type should be in Date time

I have a string with Date time format '10-12-2022 08:00 AM' I am trying to convert this string to DateTime format (GMT). 2022-10-12T12:00:00Z (Return Type should be DateTime, not the String) Method 1: ...
user avatar
  • 375
0 votes
1 answer
160 views

Why do my apex code uses other time zone?

I'm running this code to get a DateTime and change the time of it to a preset one DateTime dt = Datetime.newInstanceGMT(2021, 11, 8, 12, 0, 0); Time t = Time.newInstance(8, 0, 0, 0); System.debug('...
user avatar
0 votes
1 answer
369 views

Can Daylight Savings Time be Automated in a Formula Field?

I support a vaccine management system in salesforce. After a vaccine has been administered for a contact, a future appointment is scheduled immediately for the 2nd dose. There is a formula field on ...
user avatar
0 votes
2 answers
84 views

Change time zone in sms

I need to change the timezone to remove 6 hours compare to what SFMC is displaying in my SMS through Journey Builder. For example, in Salesforce Service Cloud, I have an appointment at 6:00 AM, and ...
user avatar
0 votes
1 answer
108 views

Email to be sent to subscribers based on the time zone in journey [closed]

I have a case in which the emails need to be delivered to the subscribers in my journey based on the time zone, like pst, cst etc. Thanks,
user avatar
  • 9
0 votes
1 answer
95 views

hour() and date() functions are returning wrong values

I am trying to get the hour and date of the user's local timezone by using the below code. now = Datetime.now(); offset = UserInfo.getTimezone().getOffset(now); local = now.addSeconds(offset/1000); ...
user avatar
0 votes
1 answer
82 views

How to insert Event with same time/timezone as it appears on Visualforce page

I have a public Visualforce page on Salesforce Sites with the form below. The site Guest user expects the event to be created in their time zone (EST) for the same date and time as it appears on the ...
user avatar
1 vote
2 answers
1k views

Salesforce DataTable issue with timeZone of datetime field

Issue I am facing is I am querying a list of data. When I am displaying that data in dataTable, datable is showing date time field based on machine this code is running, not on timeZone assigned to ...
user avatar
  • 3,299
0 votes
1 answer
34 views

Subtracting Integer from Date returning previous date than expected date

We are trying to calculate "Date A" by subtracting 5 days from "Date B". For e.g Date myDate = Date.newInstance(2021, 06, 26); Date newDate = mydate.addDays(-5); System.debug('...
user avatar
0 votes
1 answer
59 views

How can I determine the actual timezone the user is in?

I can easily pull the user records timezone field but what if the user is traveling and not in that timezone today. Is there a way to determine what timezone they are accessing salesforce from?
user avatar
  • 568
0 votes
1 answer
276 views

getDate() returns a day before the actual date

another issue with dates not working properly. I have a date field on my object. When selecting a date, I am using this in my js. let sDate = new Date(this.opportunity.data.fields.Start_Date__c.value);...
user avatar
  • 73
1 vote
1 answer
648 views

DateTime is stored in SFDC as UTC, then sent over to SFMC via Connector and is converted to Central Time - need to reconvert back to UTC

I have implemented Connector between SFMC and Sales Cloud. The date/time values that are brought over with various objects, when they arrive in SFMC, they seem to be converted to CST (SFMC servers ...
user avatar
0 votes
2 answers
245 views

DateTime value difference in UI and Soql query

The external System updates the date time field as 2021-03-15T09:00:00.000+0000. When I query the SOQL is also returning the same value. But when EST time zone user logins, the record suppose to show ...
user avatar
0 votes
1 answer
203 views

Daylight Savings Time (DST) and Last Modified Date (or Created Date) in Apex

I have to create a dynamically changing string for a Task custom field . The Apex code uses Last Modified Date within the EST time zone. My question is: Doesn't Salesforce handle the Daylight Savings ...
user avatar
1 vote
1 answer
838 views

What are all the timezones in SFMC?

So I am finding that there are different timezones in the salesforce marketing cloud across email studio, journey builder, contact builder, analytics, etc. I have identified the following: System ...
user avatar
  • 188
0 votes
1 answer
400 views

Timezone for "Date" Field should be set to 'Australia/Melbourne'

I need help from experts for a lightning data table with 'Date' type field. I want to strictly set it's timezone to 'Australia/Melbourne' irrespective of user's local timezone. For example, Even if an ...
user avatar
6 votes
1 answer
3k views

Is the time-zone attribute broken in lightning-formatted-date-time?

Based on my reading of the documentation that includes statements like this: When using the component to display a date only, without time, include time-zone="UTC" to ensure the correct ...
user avatar
  • 130k
1 vote
2 answers
477 views

In Apex, how can I format Datetime for Europe/Berlin without assuming the input value is GMT?

I currently have the following function: public String formatForGermany(Datetime targetTime) { return this.format(targetTime, 'Europe/Berlin'); } private String format(Datetime targetTime, String ...
user avatar
0 votes
0 answers
68 views

Use the date time in the timezone of the record owner on custom object

I have a custom object My_Object__c. I want to build a Formula Checkbox field where the checkbox is checked if the CreatedDate local time in the Timezone of the Owner was more than 6 pm. E.g. we have ...
user avatar
  • 1,608
2 votes
1 answer
283 views

How do i get the time zone of the device logged in as [closed]

I need to get the time zone of where the user is logged in from. I know userinfo can get the time zone of the user but i want the timezone of the device currently logged in. If my traveling user ...
user avatar
  • 25
2 votes
1 answer
31 views

What is the best way to correctly create a string with a time queried from SOQL which needs to be displayed to Germans?

We have a custom Datetime field on a custom object, Appointment__r.Start_Date__c. At 6pm, the day before the appointment, we must send every customer with an appointment an SMS which reminds them of ...
user avatar
2 votes
1 answer
2k views

Salesforce displaying Time custom field in GMT instead of User's timezone

We are facing an issue with BST and GMT time zone. We have a community portal and the org timezone and all the Users timezone are set as BST. Part of our functionality is to book an event and we ...
user avatar
2 votes
1 answer
196 views

Date.today() gives different dates on different classes

These are the two classes I have written: aura:component controller class public class ResourcesComponentClass { @AuraEnabled public static void getDate(){ Datetime dateObj = Date....
user avatar
0 votes
1 answer
1k views

I'm trying to get the time now using AMP script in marketing cloud

I'm getting a time in a variable using AMP script, the problem is that the time is in another GMT config and I was not able to find a way to change that to a specif GMT time. For now I'm using this ...
user avatar
1 vote
1 answer
381 views

Does Salesforce store user timezones in abbreviations?

I need to get the timezone of the current user in Apex but I need to get the timezone abbreviation like GMT or CST. Is this possible? Using something like this query in SOQL brings back mixed results ...
user avatar
1 vote
3 answers
1k views

Customize send time according to timezone

How we can send one single email to multiple customers based on their timezone. Let's suppose we have 10 US customers and as we have different timezones in every state. We have to customise email in ...
user avatar
2 votes
1 answer
1k views

Dates appearing one day before the actual date

I am displaying a Lead list using a datatable inside a aura:component. This is the table i am displaying: I am developing this app from India. And, when the client opens the same app from USA, this ...
user avatar
1 vote
1 answer
509 views

get short name (CST) of timezone by using TimeZoneSidKey(America/Chicago) [closed]

I wanted to display CST instead (America/Chicago) in the view. I have a TimeZoneSidKey But not sure how to get the Short Name (CST) of the timezone by using the TimeZoneSidKey .
user avatar
  • 233
0 votes
1 answer
108 views

Apex Controller Return events data in ISO8601 with a specified offset

I have a basic Apex controller that returns some Event data to my LWC: @AuraEnabled(cacheable=false) public static List<Event> getData() { return [SELECT Id, Subject, OwnerId, Location, ...
user avatar
  • 1,608
0 votes
1 answer
74 views

Date Field - Timezone Issues in Batch Job

I'm seeing peculiar behaviour on a Date field (not a DateTime field) when we utilize these date fields in a batch. For instance using the code below: endDate = Date.newInstance(startDate.Year(), 6, ...
user avatar
  • 145
2 votes
1 answer
119 views

Is there any chance to get the differnce between users timezone and GMT+0?

I know, how to get my timezone: TimeZone tz = UserInfo.getTimeZone(); And I know, how to get current time of my timezone: Datetime now = Datetime.now(); Integer offset = UserInfo.getTimezone()....
user avatar
  • 45
1 vote
1 answer
1k views

Changing data retention settings on existing data extension

Is it possible to change the data retention settings of an already-created DE? I have DE's that are automated. An automation puts data view information into these DE's but when I edit, I cant see ...
user avatar
0 votes
0 answers
171 views

A Posted Solution to a lightning:formattedDateTime Problem No Longer Works

I have the same problem asked about here, where the date displayed by the lightning:formattedDateTime component does not match the date field that's its value. I attempted the answer chosen in the ...
user avatar
1 vote
1 answer
1k views

Process builder conditions when custom date/time is NOW()

Should be simple but I'm getting stuck on the formula Building a workflow in process builder and trying to trigger an action when custom object's custom date/time field is NOW().
user avatar
0 votes
1 answer
32 views

Return of Datetime value

I am new to Apex. I have instantiated the Datetime field with (2019, 12, 31, 12, 12, 12) where hour/minute/sec all are '12'. but in the output it is returning '20:12:12'. Please help me to ...
user avatar
1 vote
1 answer
350 views

What is the correct approach to create an Event in Apex for another User with their Timezone?

I'm trying to create an event for another user which needs to appear on their Calendar (in that user's Timezone). e.g. Current user's Timezone is Australia/Sydney, I need to create an event for a New ...
user avatar
0 votes
0 answers
46 views

Event startDateTime shows more timestamp on Production

I have assigned custom timestamp to "starDateTime" standard field of event object by concatenating to custom date field but it shows additional 5:30 hours on Production.It works better in sandbox. I ...
user avatar
  • 145
1 vote
1 answer
601 views

Is StartDateTime on an Event set to UTC or GMT?

Documentation leads me to say these times are set to UTC always; If the Event IsAllDayEvent flag is set to false (indicating that it is not an all-day event), then the event start date information ...
user avatar
  • 155
0 votes
0 answers
160 views

Get LanguageLocaleKey based on timezone ID

I have a custom object called Machine__c and i have a custom picklist field in it called Time_Zone__c. This Time_Zone__c field has the same picklist values as the Standard User object timezone field. ...
user avatar
  • 91
0 votes
1 answer
1k views

Convert UTC to Local time & accounting for DST

In Salesforce Marketing Cloud, we are importing order data into a DE to drive a live, in-person, event registration confirmation email. This data includes the time of a given event in UTC format so ...
user avatar
0 votes
0 answers
226 views

How can I tell Salesforce their CPQ Developer Org is BROKEN when their Submit Case is BROKEN?

My original objective was to do the prework setting up a CPQ Developer Org for Superbadge Billing Specialist The first bullet on "Pre-work and Notes" declares: Default currency is USD and default ...
user avatar