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

Chandan V.A commented on OLINGO-247:
------------------------------------

Hi,
Despite the calendar instance being created with a particular time zone say 
CET, the system.out.println function would print the date in local time zone. 
You can try that.

Secondly the OData 2.0 specification does not tell anything related to timezone 
with respect to EdmDateTime.  As far as OData implementation in Olingo is 
concerned I did check the implementation for Date Time in class 
EdmDateTime.java. The default time zone is taken as UTC(GMT). 
[~mirbo] please confirm this.

In OData JPA processor there is no default handling of timezone is implemented. 
It is always good to store date time in UTC format in DB and display the 
datetime in client's local timezone. This means timezone conversation should 
happen in client side and not at server side.

Regards
Chandan

> Date Time and Time Zone Issue
> -----------------------------
>
>                 Key: OLINGO-247
>                 URL: https://issues.apache.org/jira/browse/OLINGO-247
>             Project: Olingo
>          Issue Type: Question
>          Components: odata4-server
>    Affects Versions: V2 1.2.0
>            Reporter: Selvaratnam Ruckman Colins
>            Assignee: Chandan V.A
>            Priority: Blocker
>
> I am using MySql data base to store Odata information,One of my table has 
> date column with value as "2013-04-02" and In my JPA entity I map this column 
> to Java Calender as follow
> @Column(name = "date",columnDefinition="DATE")
> @Temporal(TemporalType.DATE)
> private Calendar tradingDate
> But when i fetch these entities using Odata the date comes as
> <d:TradingDate>2013-04-01T18:30:00</d:TradingDate>
> In fact All dates in the table come with some reduction value which may be 
> Time Zone offset & My local time zone is IST(+5.30)
> I think the date is been converted to GMT or UTC by olingo, How do i resolve 
> this issue?



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

Reply via email to