Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Re: Why is there an offset when using DateConvert with DateCompare?

$
0
0

web-eng wrote:

 

The smart money according to many is to "always refer to UTC time" so that code can be used on any server and that sounds good to me.

Indeed the gist of the matter, spot on: compare like with like. So, what you apparently want is, either

 

<!--- Both UTC --->

<cfset date1 = dateConvert('local2Utc', now())>

<cfset date2 = dateConvert('local2Utc',createDateTime(2014,08,07,21,03,45))> <!--- Differs from createDateTime(2014,08,07,21,03,45) ! --->

 

or

 

<cfset date1 = now()>

<cfset date2 = createDateTime(2014,08,07,21,03,45)>


Viewing all articles
Browse latest Browse all 92406

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>