Hi all,
I have a requirement that I need to store timestamp values where it will be
required to retrieve it in different time zones. So in MySql, I used
timestamp data type where MySQL store  the time in UTC and return in local
timezone.

The problem is when the time is null, I need to represent 'forever'.
Thought of setting the max date possible in epoch time (Long.Max) for this.
But the max possible timestamp value in MySql is year 2038/1/19... [1].

So, is this 2038 is fair enough as the max date? (This will be the max date
for other DBMS also.)

Should I use DateTime datatype instead and handle the timezone stuff in
application level?

What is the best practice used here in Wso2?


[1] - https://dev.mysql.com/doc/refman/5.5/en/datetime.html

Regards,
Vinod
-- 
Vinod Kavinda
Software Engineer
*WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to