Forum: Building VoltDB Applications

Post: Can we setup the session date/time format and timezone through SQL?

Can we setup the session date/time format and timezone through SQL?
csyfuzhou
Sep 22, 2014
Can we setup the session date/time format and timezone through SQL?
Would this be supported in ODBC driver?
xin
Sep 22, 2014
Timezone setting is not available to be changed in our current version of VoltDB, it is always the GMT time.

FYI,
https://voltdb.com/docs/UsingVoltDB/ddlref_createtable.php

I also copy some information that may be useful for you:
The VoltDB TIMESTAMP datatype is a long integer representing the number of microseconds since the epoch. Two important points to note about this timestamp:
The VoltDB TIMESTAMP is not the same as the Java Timestamp datatype or traditional Linux time measurements, which are measured in milliseconds rather than microseconds. Appropriate conversion is needed when casting values between a VoltDB TIMESTAMP and other timestamp datatypes.
The VoltDB TIMESTAMP is interpreted as a Greenwich Meantime (GMT) value. Depending on how time values are created, their value may or may not account for the local machine's default time zone. Mixing timestamps from different time zones (for example, in WHERE clause comparisons) can result in unexpected behavior.

Let us know if you have more questions.

Thanks,
Xin