Some optimizations to TimeUtil.
Nothing significant changed in UrlUtil.