I need to capture the current users current time in a VF page. Is there a way to capture that info in controller?

3 Answers 3


If you don't mind having the date in there:


Spring '13 will have a TimeZone class. You'll be able to get the timezone for the current user and do whatever math you need based on its offset from GMT.


System.Now should give you the Current time and display to the User in his local current time Zone .

Other approach is to get the locale using userinfo.getlocale

1)Maintain an offset in custom setting

2)From GMT time you can set the Offset.

I would say that simply system.Now gets you time in the Time Zone of the User


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .