[rt-users] What’s the correct SQL syntax for a date/time custom field that’s not set?

Landon Stewart lstewart at iweb.com
Wed Nov 20 14:43:41 EST 2013


On 20 November 2013 11:29, Alex Vandiver <alexmv at bestpractical.com> wrote:

> On Wed, 2013-11-20 at 11:13 -0800, Landon Stewart wrote:
>
> > Is using > "1970-01-01 00:00:00” the only way?
>
> Currently, yes.
>

Ok thank you.


> > Seems like that definite value might be begging for bugs or something
> > if somehow the unset date equals "1970-01-01 05:00:00” for some reason
> > down the road.  I just want to make sure I’m not setting myself up for
> > buggy behaviour in the future.
>
> That magic date is the "UNIX epoch," and will not change.
>  - Alex
>

Oh I knew it was the Unix epoch date/time but I was concerned that maybe if
the server’s timezone changed it could somehow offset the epoch.  I guess
since that’s simply the ‘display’ version of null then it’s safe to use it
as a constant.

Anyway thanks again.


-- 
Landon Stewart :: lstewart at iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20131120/2233fa49/attachment.htm>


More information about the rt-users mailing list