Parallels H-Sphere Documentation Developer Guide


TimeUtils Class


Last modified: 21 Jan 2005


WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the official Parallels site.

The TimeUtils class is designed to subsitute all other H-Sphere classes dealing with time. This class is needed for testing any H-Sphere features that use time (like accounts, domain registration renewals, and the like).

From now on, please ALWAYS use the following TimeUtils wrappers instead of any other Date/Time functions:

System.currentTimeMillis() = TimeUtils.currentTimeMillis()
new java.util.Date = TimeUtils.getDate()
Calendar.getInstance() = TimeUtils.getCalendar()
Thread.sleep(s) + TimeUtils.sleep(s)

Other utilities HIGHLY recommendable for usage:

java.sql.Date getSQLDate()
java.sql.Timestamp getSQLTimestamp()
java.sql.Time getSQLTime()
java.util.Time getTime()

© Copyright 2018. Parallels Holdings. All rights reserved.