Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
import java.util.Date;
import org.joget.commons.util.TimeZoneUtil;
import org.joget.apps.app.service.AppUtil;
 
//Format current date to System/User selected timezone and date format
String dateString = TimeZoneUtil.convertToTimeZone(new Date(), null, AppUtil.getAppDateFormat());

Methods

Thai

กระบวนการ

convertToTimeZone
public static java.lang.String convertToTimeZone(java.lang.Date time, java.lang.String gmt, java.lang.String format) 

...

public static java.lang.String getServerTimeZone()
English
Retrieve Server Time Zone in GMT format
Thai

ดึงเขตเวลาของเซิร์ฟเวอร์ในรูปแบบ GMT

...