You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Gaojinchao <ga...@huawei.com> on 2011/08/15 03:50:12 UTC

A question about timestamp

Sometimes we may change time zone for our produce, Hbase will can't work well.
can we add a switch that uses UTC time?

Re: A question about timestamp

Posted by Gaojinchao <ga...@huawei.com>.
Sorry, I make a mistake. I used date command modifying time(ntp server). Because of the machine crashed.
The result can't save. I was mistaken due to time zone changes.


-----邮件原件-----
发件人: saint.ack@gmail.com [mailto:saint.ack@gmail.com] 代表 Stack
发送时间: 2011年8月16日 11:40
收件人: user@hbase.apache.org
主题: Re: A question about timestamp

On Sun, Aug 14, 2011 at 6:50 PM, Gaojinchao <ga...@huawei.com> wrote:
> Sometimes we may change time zone for our produce, Hbase will can't work well.

How you mean?  HBase default timestamping uses this function:
http://download.oracle.com/javase/1,5.0/docs/api/java/lang/System.html#currentTimeMillis()
 As per J-D, this should UTC (basically) so immune to timezone
(Correct us if we have it wrong).

Thanks,

St.Ack

Re: A question about timestamp

Posted by Stack <st...@duboce.net>.
On Sun, Aug 14, 2011 at 6:50 PM, Gaojinchao <ga...@huawei.com> wrote:
> Sometimes we may change time zone for our produce, Hbase will can't work well.

How you mean?  HBase default timestamping uses this function:
http://download.oracle.com/javase/1,5.0/docs/api/java/lang/System.html#currentTimeMillis()
 As per J-D, this should UTC (basically) so immune to timezone
(Correct us if we have it wrong).

Thanks,

St.Ack

Re: A question about timestamp

Posted by Jean-Daniel Cryans <jd...@apache.org>.
timestamps are in UTC already, whether you are in PST or GMT+8 you're
still the same number of ms from January 1, 1970 UTC.

J-D

On Sun, Aug 14, 2011 at 6:50 PM, Gaojinchao <ga...@huawei.com> wrote:
> Sometimes we may change time zone for our produce, Hbase will can't work well.
> can we add a switch that uses UTC time?
>