[ 
https://issues.apache.org/jira/browse/OLINGO-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Selvaratnam Ruckman Colins reopened OLINGO-247:
-----------------------------------------------


Thanks Chandan but Still i could not make up my mind because i commented my 
code inside the setter method and modified the getter method to print  the 
current time on CONSOLE and return the same calender instance,Please see below

  public Calendar getTradingDate() {
  
    Calendar calendar = Calendar.getInstance(TimeZone.getDefault());
    System.out.println(calendar.getTime());
    return calendar;
    // return tradingDate;
  }
 public void setTradingDate(Calendar tradingDate) {
  
    // this.tradingDate = tradingDate;
  }
But I got the console value as 
=======================
Wed Apr 16 14:57:36 IST 2014
>From Odata
=========
<d:TradingDate>2014-04-16T09:27:36.495</d:TradingDate>

How could have this happened even after i stop  getting the date from database?


> 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