You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function epoch() hint="returns the number of milliseconds since 1/1/1970 (local). Call .utc() first to get utc epoch" {
/*
It seems that we can't get CF to give us an actual UTC datetime object without using DateConvert(), which we
can not rely on, because it depends on the system time being the local time converting from/to. Instead, we've
devised a system of detecting the target time zone's offset and using it here (the only place it seems necessary)
to return the expected epoch values.
*/
return this.clone().getDateTime().getTime() - this.utc_conversion_offset;
var adjustment = (this.utc_conversion_offset > 0) ? -1 : 1;
return this.clone().getDateTime().getTime();
return this.clone().getDateTime().getTime() - (this.utc_conversion_offset * adjustment);
}
Only the first return will get executed! Why the other code?
The text was updated successfully, but these errors were encountered:
I just noticed this piece of code
Only the first
return
will get executed! Why the other code?The text was updated successfully, but these errors were encountered: