Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [timezone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
79 views

import TIME_ZONE from '@salesforce/i18n/timeZone'; Which Timezone does it returns? Browser timzone or Salesforce User Record Timezone

I was working on a requirement where I have to show DateTime in your time zone based on timezone setup in user record. I am using import TIME_ZONE from '@salesforce/i18n/timeZone'; to get the user ...
sanket kumar's user avatar
  • 15.4k
0 votes
2 answers
238 views

Correct date and time while considering Daylight Savings Time (DST) in event confirmations sent out via SFMC but created in SFSC needed

Some time ago I was working on some Marketing Automation improvements at a client when we encountered a very specific problem: For appointment confirmations sent out via e-mails from SF Marketing ...
Andreico7's user avatar
0 votes
0 answers
61 views

Is there a way to set a block out window in journey builder for emails?

I am trying use use Einstein STO but I am concerned that my users will get the email too early in the morning. I know I can probably just set the STO window to 12 hours or something, but is there ...
Scott Lam's user avatar
0 votes
2 answers
476 views

Salesforce Time Zones

Is there an explanation for the time zones in the user details list, specifically what seems to be unnecessary duplicates? Examples: (GMT-05:00) Central Daylight Time (America/Indiana/Knox) (GMT-05:...
Jeff's user avatar
  • 145
0 votes
0 answers
454 views

Passing lightning-input time value from LWC to APEX taking timezone into acount

I'm having trouble passing a time (not datetime, not date) from custom LWC to APEX and saving it taking the user time zone into account. Before giving the details, I'd like to say that I checked here, ...
Miguel Bohrz's user avatar
0 votes
1 answer
120 views

converting DateTime to String returns the wrong Date as a String

I have the following code to get the DateTime for EST Time Zone Timezone tz = Timezone.getTimeZone('America/New_York'); DateTime now = Datetime.now(); Datetime localTime = now.addSeconds((tz.getOffset(...
potato46's user avatar
1 vote
1 answer
98 views

How to replace time part of DATETIME input by value from TIME input

I've tried to find an algorithm (Salesforce, aura) but without success. Probably, you have any ideas! I have: attribute <aura:attribute name="bulkApply" type="Map" default=...
Daniel Velesevich's user avatar
0 votes
0 answers
227 views

Can you allow users to select a specific timezone on a date / time field?

We have a scenario where we want to allow a user (who works in EST) to be able to select a date / time for a specific timezone. Our users submit orders for customers across multiple time zones and are ...
user124216's user avatar
2 votes
0 answers
688 views

TimeZoneSidKey field in user object not returning entire list of picklist values in when executed in apex context but its working with workbench

code used in method to fetch all the timezone value list: List<DropdownWrapper> timezones = new List<DropdownWrapper>(); Schema.DescribeFieldResult descField = User.TimeZoneSidKey....
neeraj sathish's user avatar
0 votes
0 answers
206 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 ...
Balaji Pooruli's user avatar
0 votes
1 answer
5k 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 ...
priyasfdc's user avatar
0 votes
1 answer
2k 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 ...
jojopogi's user avatar
  • 502
0 votes
0 answers
222 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 ...
Daniel Quijada's user avatar
0 votes
1 answer
73 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 ...
jojopogi's user avatar
  • 502
0 votes
0 answers
36 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 ...
Heather's user avatar
  • 51
0 votes
0 answers
543 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 ...
Dman100's user avatar
  • 2,445
-1 votes
1 answer
663 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", "...
Balaji Pooruli's user avatar
-1 votes
2 answers
2k 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: ...
Donald's user avatar
  • 385
0 votes
1 answer
1k 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('...
EDD rico's user avatar
0 votes
1 answer
2k 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 ...
Adrianne Geyer's user avatar
0 votes
2 answers
256 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 ...
Anne-Sophie's user avatar
0 votes
1 answer
590 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,
Swetha's user avatar
  • 9
0 votes
1 answer
447 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); ...
Akshay Vasu's user avatar
0 votes
1 answer
372 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 ...
T. Webster's user avatar
1 vote
3 answers
6k 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 ...
Manjot Singh's user avatar
  • 3,516
0 votes
1 answer
499 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('...
SFDCUser's user avatar
0 votes
1 answer
247 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?
Ohmicron's user avatar
  • 687
0 votes
1 answer
3k 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);...
Eric's user avatar
  • 73
1 vote
1 answer
2k 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 ...
Mike Marks's user avatar
0 votes
2 answers
1k 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 ...
indrasen neelam's user avatar
0 votes
1 answer
438 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 ...
Anthony Williams's user avatar
1 vote
1 answer
2k 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
0 votes
1 answer
944 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 ...
Gaurav Sharma's user avatar
6 votes
1 answer
7k 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 ...
Keith C's user avatar
  • 136k
1 vote
2 answers
994 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 ...
Brian Kessler's user avatar
0 votes
0 answers
199 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 ...
zaitsman's user avatar
  • 1,930
2 votes
1 answer
744 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 ...
johnlxc's user avatar
  • 25
2 votes
1 answer
42 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 ...
Brian Kessler's user avatar
2 votes
1 answer
6k 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 ...
Aditya Sehgal's user avatar
2 votes
1 answer
2k 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....
Jayesh Babu's user avatar
0 votes
2 answers
2k 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 ...
user87331's user avatar
1 vote
1 answer
751 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 ...
Deployment Failure's user avatar
2 votes
3 answers
3k 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 ...
Drishti Jindal's user avatar
2 votes
1 answer
3k 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 ...
Jayesh Babu's user avatar
1 vote
1 answer
1k 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 .
RKCY's user avatar
  • 323
0 votes
1 answer
175 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, ...
zaitsman's user avatar
  • 1,930
0 votes
1 answer
176 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, ...
cloudcap's user avatar
  • 187
2 votes
1 answer
819 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()....
Dan Dan's user avatar
  • 45
1 vote
1 answer
2k 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 ...
Bloodborne's user avatar
0 votes
0 answers
269 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 ...
Gabriel Rivera's user avatar