On 04/28/2010 06:27 PM, flyisland wrote:
Hi Valdis,
Thank you for your quickly response.
The "$datetool.get('dd.MM.yyyy HH:mm')" still returns wrong time --
11.5
hours behind my laptop's system time. And I'm quite sure that the shown
system time and time zone of my laptop is right.
what can i do to debug this issue?
On Wed, Apr 28, 2010 at 10:55 PM, Valdis Vītoliņš<valdis.vitolins(a)odo.lv>wrote;wrote:
> Please add following code in some page (xwiki 1.0 syntax)
>
> $datetool.get('dd.MM.yyyy HH:mm')
>
> Save and check what date is shown in page.
>
> If shown time is wrong, then server simply doesn't have correct time
> and/or time zone.
>
> Valdis
>
>> Hi All,
>>
>> I have installed "XWiki Enterprise 2.2.1.27354" on my laptop, and
found
> that
>> after created or modified the document, the "created" and "last
modified"
>> time are wrong!
>>
>> For example, my local time is "2010/04/28, 22:08", but the
"date" of the
>> document I just created is "2010/04/28, 09:38". My local time zone is
>> "Beijing, China", UTC/GMT +8 hours.
>>
>> How could I solve this issue? You comments are welcome!
Try putting this in a page, see what you get:
{{groovy}}
print System.getProperty("user.timezone");
{{/groovy}}
If it's not the one you want, then you should edit start_xwiki.sh (or
.bat if you're on Windows) and add this to the JAVA_OPTS variable:
-Duser.timezone=Asia/Shanghai
--
Sergiu Dumitriu
http://purl.org/net/sergiu/