[ 
https://issues.apache.org/jira/browse/PHOENIX-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14007209#comment-14007209
 ] 

Gabriel Reid commented on PHOENIX-997:
--------------------------------------

[~jaywong] could you give a bit more background on the use case where you're 
running into issues? Is this when running an import, or when executing queries 
and converting a date into a string, or something else?

Related to this, I think it would be good to have a DateTime parser that could 
handle timzone information within a date-time String value, and/or support for 
customized date-time formats -- this could potentially be supplied via the JDBC 
connection properties.

> Timestamp date type default format with GMT time zone
> -----------------------------------------------------
>
>                 Key: PHOENIX-997
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-997
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: jay wong
>             Fix For: 3.1
>
>
> the code :
> org.apache.phoenix.util.DateUtil
> public static final TimeZone DATE_TIME_ZONE = TimeZone.getTimeZone("GMT");
> public static Format getDateParser(String pattern) {
>         SimpleDateFormat format = new SimpleDateFormat(pattern) {
>             @Override
>             public java.util.Date parseObject(String source) throws 
> ParseException {
>                 java.util.Date date = super.parse(source);
>                 return new java.sql.Date(date.getTime());
>             }
>         };
>         format.setTimeZone(DateUtil.DATE_TIME_ZONE);
>         return format;
>     }
> ==================
> Every phoenix user will be formated with GMT time zone.
> But other's, just like me .the time zone is GMT+8
> I think it will be default not be set with 
>     format.setTimeZone(DateUtil.DATE_TIME_ZONE);
> when anyone want to set it.  add a config in hbase-site.xml.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to