var time = new GlideDateTime(); gs.info('GMT time is->'+time); var tz = Packages.java.util.TimeZone.getTimeZone('PST'); time.setTZ(tz); var timeZoneOffSet = time.getTZOffset(); time.setNumericValue(time.getNumericValue() + timeZoneOffSet); gs.info('PST time is->'+time);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter