sap-commerce-cloudimpex

How to specify a timezone for date format in impex?


I want to specify the timezone while saving a date field. I've tried the impex above:

#% impex.setLocale( Locale.TURKISH );
$standardHours1=standard-hrs1

INSERT_UPDATE OpeningSchedule;code[unique=true];
                             ;$standardHours1;

INSERT WeekdayOpeningDay;openingTime[dateformat='T''HH:mm'];dayOfWeek(code,itemtype(code));closingTime[dateformat='T''HH:mm'];openingSchedule(code);&componentRef
                                ;10:00;MONDAY:WeekDay;12:30;$standardHours1;mon1

I've tried answers from this question from help hybris but it didn't work for me. I'm using hybris 1905.


Solution

  • From the same source you mentioned:

    ;startTime[dateformat='dd.MM.yyyy''T''HH:mm:ssZ']
    ;"23.02.2019T13:28:00+0300"
    

    The +0300 is the timezone; it's UTC+3. However, it will be converted to an equivalent value in the Hybris app server's timezone. If the Hybris app server is UTC+8, then the UTC+3 value will be converted to an equal value in UTC+8.