Questions tagged [timezone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
2k 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().
John1019's user avatar
0 votes
1 answer
251 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 ...
Somsubhra Sarkar's user avatar
1 vote
1 answer
687 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 ...
Pasan Eeriyagama's user avatar
0 votes
0 answers
72 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 ...
jsmith's user avatar
  • 155
1 vote
1 answer
1k 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 ...
r0bb077's user avatar
  • 155
0 votes
0 answers
299 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. ...
Sisir's user avatar
  • 111
0 votes
1 answer
2k 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 ...
dfqueally42's user avatar
0 votes
0 answers
291 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 ...
Brian Kessler's user avatar
0 votes
1 answer
813 views

Is there a way to detect actual user time zone (not Salesforce user acc.) in visualforce?

We have a "guest" form on our site, and a "guest" user to authenticate. Since the user has a set time zone, this is what (by default) is used by visualforce. Problem is, our Guest User will always be ...
Natalie Paige's user avatar
0 votes
1 answer
2k views

How to provide default DateTime value in UTC time

I am providing a default value to a DateTime field in my apex class. customobject.DateTime__c = DateTime.parse('01/01/1990 12:00 AM'); I want to set the default value to 01/01/1990 12:00 am UTC ...
Student's user avatar
  • 565
0 votes
0 answers
347 views

DateTime newInstance doesnt get in user locale

In my code I try to set datetime based on selected location. The Idea is, when the user select locale and then the time, record will be saved with selected datetime value based on selected locale. But ...
Viktor's user avatar
  • 360
3 votes
1 answer
1k views

TimeZone.getTimeZone(tz) where String tz equals a supported (I think) timeZoneIdString throws 'Method does not exist or incorrect signature' error

Converting code to utilize the TimeZone class for easier maintainability. For now, I'm stuck relying on a pseudo-timezone field on contacts (c.Time_Zone__c below) to make the determination and setting ...
Nate Gelle's user avatar
0 votes
1 answer
915 views

Business Hours calculation is incorrect/ not consistent for certain dates

My use case is to calculate the deadline to respond on the Case. Rule is to add 10 business days from the complaint received date. Defined the business hours: Logic 1 Date initialDate = ...
indrasen neelam's user avatar
5 votes
1 answer
5k views

Why are Marketing Cloud timestamps not stored in the same timezone as Sales Cloud?

I have both Sales Cloud and Marketing Cloud connected and use data shared for a Journey when new records are created. In my object that is triggered in the journey I have a Date/Time field which gets ...
Deployment Failure's user avatar
4 votes
1 answer
4k views

What is the system timezone in Marketing Cloud and does it consider DST? [duplicate]

My understanding is that the system timezone is CST. Is this correct? When Day Light Saving time occurs does this change to CDT?
Deployment Failure's user avatar
0 votes
2 answers
157 views

Auto DST for Marketing Cloud accounts [duplicate]

Does Marketing Cloud automatically switch all relevant user accounts when Day Light Saving time occurs? (i.e. their user account timezone is changed)
Deployment Failure's user avatar
1 vote
1 answer
1k views

How to handle Day Light Saving time in AMPScript

In our Marketing Cloud emails we send emails which contain time slots for Appointments to customers. The data is stored in UTC time in Sales Cloud, and then copied over to Marketing Cloud Data ...
Deployment Failure's user avatar
0 votes
1 answer
95 views

Formatting Time after clocks change

Background I have a simple apex function which returns a date time formatted using a time zone: public String getFormattedDatetime() { TimeZone tz = UserInfo.getTimeZone(); return ...
Robs's user avatar
  • 9,336
8 votes
1 answer
5k views

How can I query the supported timezones in Apex?

Apex provides a TimeZone API. You can use this to query the detail of a time zone, named using its "SID" (a value like "Europe/London" or "America/New_York" for example). However, this API doesn't ...
Phil W's user avatar
  • 36.2k
1 vote
0 answers
81 views

How to get records created between timeframe in a report

I need to create a report of all the records between 7am to 5pm CST/CDT everyday. How can I achieve this? The solution I tried - Created a formula field which extracts Hours from created date (...
P P's user avatar
  • 107
0 votes
1 answer
2k views

Time field based on TimeZone

Is Salesforce time field dependant on timezone. Is the time field value change based on TimeZone.
k.s.mahes prabakar's user avatar
0 votes
1 answer
365 views

What is the behavior of date/time fields regarding daylight saving time?

A user located in São Paulo/Brasil is on the UTC-3 timezone. As I write this post it is actually UTC-2 because of daylight saving time. That means that records created today will have the value of ...
Renato Oliveira's user avatar
3 votes
1 answer
1k views

Format date time field to specific time with AMPscript in Marketing Cloud

I have a question; we are trying to send an appointment confirmation through Journey Builder. Now we are struggling to get the time right. It looks like there is added 1 and sometimes 2 minutes to the ...
Klaas Faze's user avatar
0 votes
5 answers
921 views

How to format a Date with Amscript

While setting an hour in Sales, it seems the Amscript in Marketing Cloud I am using is getting minus one hour. I set 14.00 in Sales and I get 13:00 in Marketing Cloud. I am trying to use zzz or xxx ...
Daniel's user avatar
  • 105
1 vote
1 answer
3k views

Salesforce datetime field adding user timezone to the field

I have two datetime field in custom object, to which I am inserting values programatically from my apex class. Fields from my custom object My apex code used to insert/update records in the custom ...
Aruna's user avatar
  • 427
0 votes
1 answer
512 views

Storing DateTime and Timezone in a Text field

We have a requirement in which we copy Event.StartDateTime in another field called Activity.Start_Date_Time_Text__c. The calculation of DateTime (UTC at rest) Text happens in before insert and update ...
Json Bourne's user avatar
1 vote
1 answer
448 views

Prepopulating Time field in Lightning Quick Action: user time zone not respected

I am building a Lightning Quick Action for an object that includes a field of type Time. I would like to prepopulate that Time field with the current time, while allowing the user to make changes. ...
David Reed's user avatar
  • 92.8k
1 vote
1 answer
1k views

Business Hours difference calculation during BST

Hello I need help understanding how business hours difference is calculated with the Apex class. The documentation is rather poor and doesn't explain the input parameters assumptions. I found one post ...
user682217's user avatar
  • 1,171
0 votes
2 answers
2k views

Specific timezone on visualforce page

page <apex:variable value="{!activity}" var="act"> <apex:outputText value="{0,date,h:mm a}"> <apex:param value="{!act.Date__c}" /> </apex:outputText> controller....
Logan H's user avatar
  • 71
0 votes
2 answers
2k views

How to Convert DateTime String Received From API Response?

I am making a callout to external system and I am receiving datetime like 18-10-07T18:00:00 Now, if I do like String startDate = '2018-10-07T18:00:00'; DateTime testDateTime = DateTime.valueOf(...
Nachiket Deshpande's user avatar
0 votes
2 answers
561 views

Issue in workflow field update based on created date

I am not able to understand why field update is working differently for these two cases. Workflow field update: ObjectCase Field to UpdateCase: Target Date Field Data TypeDate Re-evaluate Workflow ...
Sharmila's user avatar
0 votes
1 answer
2k views

Difference in Case Created Date in UI and System Backend

created date on case UI is displaying 5/9/2018 date but in backend created date is showing value 6/9/2018 When I am querying through developer console. I have one workflow rule to calculate Target ...
Sharmila's user avatar
1 vote
1 answer
1k views

How can I convert a time value given in IST to GMT in apex?

I have the following information: Week Number, Week Day and Time in AM/PM as fields in an object. And, another field to indicate if these values are provided as per GMT or IST. In my apex code, I ...
Komal Narsinghani's user avatar
1 vote
2 answers
1k views

DateTime in Data Extension is 4 hours later than entry data

I've got a journey that uses data entry from Salesforce, specifically when a lead registers for an event an Event Registrant object is created. I am pulling in the Event_Date_Time__c and ...
JaredT's user avatar
  • 880
0 votes
1 answer
786 views

Marketing Cloud - Timezone - Format/Display

I guys. Need your help, please. 1 -I know the dates in Marketing are saved in CST timezone, but when I view them in "form mode" I need to see them as GMT / UCT. I have already set up account and user ...
Mendes's user avatar
  • 23
1 vote
2 answers
65 views

Timezone formula field- why doesn't my exception line work?

The formula below works perfectly, except the part in bold. I want to add an exception to assigning time zones by state for this one particular city (for now). I have been tweaking it for a while now ...
SMarq's user avatar
  • 25
0 votes
1 answer
259 views

Create Users Records with SFDX, Bad Timezone

I'm Trying to create one user record with by creating them with SFDX and the minimum required data about the user, into a scratch org (later trying it in an actual sandbox or production), but I have ...
ekiim's user avatar
  • 323
0 votes
4 answers
1k views

Which users context will SOAP apex class execute in?

I have a SOAP apex class which exposes some webservice methods to be calls from my applications backend. This code has some DateTime methods that return the values based on context user's timezone ...
Yogesh D's user avatar
  • 580
4 votes
1 answer
950 views

how can we display only the timezone in AMPscript

how can we display only the timezone in AMPscript using now(). I tried using %%=Format(Now(),'zzzz')=%% but its not displaying the timeZone instead it's displaying -06:00.
Suman's user avatar
  • 98
0 votes
1 answer
1k views

Apex execution context and DateTime class

I have a code which does this, Datetime dt = Datetime.NOW(); String starttime = dt.hour(); Now from the apex documentation, now() returns the current datetime based on GMT and hour() returns the ...
Yogesh D's user avatar
  • 580
2 votes
1 answer
2k views

Formula fields to display Current time based on Company Information

Formula field to display current time based on the Company's default time zone, does anybody have the idea how to achieve this For User's timeZone current time used the NOW() - but don't know how to ...
SFDC's user avatar
  • 461
2 votes
2 answers
12k views

How to set datetime to be a specific time in a fixed timezone

I have used the following code to set the time for GMT: Time TIME_6_PM = Time.newInstance(18, 0, 0, 0); Datetime fixedTime = Datetime.newInstanceGmt(oldTime.dateGMT(), TIME_6_PM); However, I am ...
Lance Shi's user avatar
  • 13k
0 votes
1 answer
73 views

Due time calculated to be 19:00 instead of 18:00 when after 25/3

I am using the below code in the trigger to calculate due time: Time TIME_6_PM = Time.newInstance(18, 0, 0, 0); ol.Transcript_Due__c = Datetime.newInstanceGmt(ol....
Lance Shi's user avatar
  • 13k
0 votes
1 answer
563 views

Time Zone set in automation through soap api

I created Scheduled automation through soap api. but i am not getting current time zone. I used particular time zone with below code but automation taking default time zone than how to set particular ...
UserSFMC's user avatar
  • 157
1 vote
1 answer
728 views

BusinessHours API not returning correct isWithin() value

I'm trying to use APEX BusinessHours class to check whether a certain Date is a Business Day or Not. Here is my Business Hour in my Organization: Based on this, if I provide following date input, it ...
VarunC's user avatar
  • 5,950
3 votes
0 answers
45 views

What time zone is used for platform events? [duplicate]

When code is run in the context of a platform event, which time zone is chosen as the context time zone, and can that time zone be configured? Unlike site guest users, the "Process Automated" ...
martin's user avatar
  • 12.6k
9 votes
1 answer
2k views

Which timezone are the platform events run with?

What does Salesforce use as the system time when running those jobs? The current system time (UTC)? My context is that I have a job that is run every 30 minutes and it executes a task for some of my ...
Renato Oliveira's user avatar
0 votes
2 answers
945 views

Run formula only once on Salesforce custom Date/time field

I was facing some time-zone related issue with custom date/time object on salesforce basically I am creating/updating that value via force.com api's from different application. And salesforce convert ...
Anil Yadav's user avatar
0 votes
1 answer
1k views

Incorrect Created Date in Salesforce Report

I have a report in salesforce named Yesterday's Transactions(Type:Opportunities with Transaction). I have two fields i.e. Transaction Id and Created Date. My report contains today's date even though ...
Subhash Deshmukh's user avatar
0 votes
0 answers
492 views

Dealing with Site Guest User in GMT timezone between controller and VF page (which is in CDT)

I am having some difficulties with timezones... I have a guest site user who is in GMT time. So, when apex is running, they have GMT+0 timezone. The salesforce user that sends them the link to the ...
Tyler Dahle's user avatar
  • 2,699