[opencms-dev] Time warp: How to get warped time
Paul-Inge Flakstad
flakstad at npolar.no
Mon Nov 10 17:19:44 CET 2014
Self-replying:
CmsWorkplaceSettings wpSettings = (CmsWorkplaceSettings)session.getAttribute(CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS);
long timeWarpMillis = wpSettings.getUserSettings().getTimeWarp(); // Note: will return 0 if time warp is not active
Date warpedDate = new Date(timeWarpMillis);
Added to the Wiki as well: http://www.opencms-wiki.org/wiki/Getting_server_information#Get_the_.22warped.22_time
Paul
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Paul-Inge Flakstad
Sent: 10. november 2014 14:58
To: The OpenCms mailing list
Subject: [opencms-dev] Time warp: How to get warped time
Hi,
How do I get the current user's "warped" time, if the user has activated time warp?
Cheers,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20141110/bf8a5220/attachment.htm>
More information about the opencms-dev
mailing list