Questions tagged [timezone]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 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 ...
0
votes
1answer
37 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 ...
0
votes
0answers
22 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 ...
2
votes
1answer
28 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 ...
0
votes
1answer
52 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 = ...
5
votes
1answer
172 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 ...
4
votes
1answer
100 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?
0
votes
2answers
34 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)
1
vote
1answer
37 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 ...
0
votes
1answer
24 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 ...
6
votes
1answer
351 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 ...
1
vote
0answers
20 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 (...
0
votes
1answer
82 views

Time field based on TimeZone

Is Salesforce time field dependant on timezone. Is the time field value change based on TimeZone.
0
votes
1answer
34 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 ...
0
votes
0answers
43 views

Issue with hour of Scheduled Date for Time based Workflow

I have the following issue. I have 2 Workflow rules, one to send an email 30 days before 'Close Date' and another one to send an email 60 days before 'Close Date'. The 30 days workflow is working just ...
2
votes
1answer
62 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 ...
0
votes
5answers
105 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 ...
0
votes
0answers
16 views

Developer Console 'Enqueued Time' is not displaying for asynchronous test

I see the 'Enqueued Time' value is not displaying for asynchronous apex tests in the Developer Console. I also saw a few days ago, the date was incorrectly displayed. Date of test was 10th December, ...
1
vote
1answer
421 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 ...
0
votes
1answer
36 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 ...
1
vote
1answer
78 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. ...
0
votes
2answers
263 views

How to correctly handle timezone difference in data views from Marketing Cloud

I store the last open times for my emails in a separate Data Extension queried from the _opens data view. The problem I have is that I need to be able to see who's received an email today via a ...
1
vote
1answer
194 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 ...
0
votes
2answers
184 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....
1
vote
3answers
382 views

SFMC timezone in datetime fields

The SFMC APIs return datetime fields without any timezone information. For example, the GET campaigns endpoint returns the following: { "id": "301", "createdDate": "2012-11-29T16:18:31", "...
0
votes
2answers
79 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(...
0
votes
2answers
105 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 ...
0
votes
1answer
120 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 ...
0
votes
1answer
160 views

Convert string time to datetime with timezone

I have a requirement where I want to convert a String time "15:00" (pstTime String) in PST timezone to a string time "08:00"(gmtTime String) in GMT. The date is immaterial. The way I'm trying to ...
1
vote
1answer
357 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 ...
1
vote
2answers
295 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 ...
0
votes
1answer
286 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 ...
1
vote
2answers
55 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 ...
0
votes
1answer
67 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 ...
0
votes
4answers
105 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 ...
2
votes
1answer
262 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.
0
votes
1answer
104 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 ...
2
votes
1answer
384 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 ...
1
vote
1answer
192 views

How to handle all day events and timezones in apex?

When getting events that are not marked all day, they have their properly timezoned start and end times, so turning them into a datetime object is no problem. When an event is marked all day, their ...
1
vote
2answers
505 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 ...
0
votes
1answer
34 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....
1
vote
1answer
189 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 ...
1
vote
0answers
116 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 ...
3
votes
0answers
29 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" ...
7
votes
1answer
353 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 ...
0
votes
2answers
113 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 ...
0
votes
1answer
135 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 ...
0
votes
0answers
92 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 ...
0
votes
2answers
350 views

Convert UTC time to user locale time

I want to display the users previous log in time. I created a query for it and this gives me the right field. But this always shows UTC time and not the user locale. I do need to show it in the users ...
0
votes
1answer
437 views

Business Hours and Time Zones (EDT vs EST?)

I have trigger code that is calculating the span between two Date/Time fields - respecting Business Hours - easy. Business Hours end daily at 5pm - and the Time Zone is set to EST (however we're ...