List of usage examples for java.util TimeZone setDefault
public static void setDefault(TimeZone zone)
From source file:Main.java
public static void main(String args[]) { TimeZone tzone = TimeZone.getTimeZone("America/Los_Angeles"); // set time zone to default tzone.setDefault(tzone); // checking default time zone System.out.println("Default time zone:" + tzone); }
From source file:com.venilnoronha.dzone.feed.DZoneFeedApplication.java
public static void main(String[] args) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); SpringApplication.run(DZoneFeedApplication.class, args); }
From source file:studio.core.EntryPoint.java
public static void main(final String[] args) { TimeZone.setDefault(TimeZone.getTimeZone("GMT")); if (System.getProperty("mrj.version") != null) { System.setProperty("apple.laf.useScreenMenuBar", "true"); // System.setProperty("apple.awt.brushMetalLook", "true"); System.setProperty("apple.awt.showGrowBox", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Studio for kdb+"); System.setProperty("com.apple.mrj.application.live-resize", "true"); System.setProperty("com.apple.macos.smallTabs", "true"); System.setProperty("com.apple.mrj.application.growbox.intrudes", "false"); }//from ww w. j a v a 2s. c om if (Config.getInstance().getLookAndFeel() != null) { try { UIManager.setLookAndFeel(Config.getInstance().getLookAndFeel()); } catch (Exception ex) { // go on with default one ex.printStackTrace(); } } final CommandLineParser cmdLineGnuParser = new GnuParser(); try { CommandLine commandLine = cmdLineGnuParser.parse(constructGnuOptions(), args); if (commandLine.hasOption("servers")) { String fileName = commandLine.getOptionValue("servers"); Config.getInstance().loadFromFile(fileName); } } catch (Exception e) { e.printStackTrace(); } studio.ui.I18n.setLocale(Locale.getDefault()); // studio.ui.I18n.setLocale(new Locale("zh", "cn")); if (!Config.getInstance().getAcceptedLicense()) { LicensePanel panel = new LicensePanel(); Object[] options = new String[] { "Accept", "Do Not Accept" }; int answer = JOptionPane.showOptionDialog(null, panel, "Studio for kdb+", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, Studio.getImage(Config.imageBase + "32x32/question.png"), //do not use a custom Icon options, //the titles of buttons options[1]); //default button title if (answer == JOptionPane.NO_OPTION) System.exit(0); Config.getInstance().setAcceptedLicense(Lm.buildDate); } UIManager.put("Table.font", new javax.swing.plaf.FontUIResource("Monospaced", Font.PLAIN, UIManager.getFont("Table.font").getSize())); System.setProperty("awt.useSystemAAFontSettings", "on"); System.setProperty("swing.aatext", "true"); ThreadGroup exceptionThreadGroup = new ExceptionGroup(); new Thread(exceptionThreadGroup, "Init thread") { public void run() { Studio.init(args); } }.start(); }
From source file:com.prodigious.festivities.api.app.Application.java
public static void main(String[] args) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners(new ApplicationPidFileWriter()); springApplication.run(args);// w w w . j a v a 2s . c om }
From source file:com.qpark.eip.core.model.analysis.config.ModelAnalysisPersistence.java
/** * Run the spring boot application./*from w w w .java 2 s . c o m*/ * * @param args * the arguments. */ public static void main(final String[] args) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); System.setProperty("file.encoding", "UTF-8"); SpringApplication.run(ModelAnalysisPersistence.class, args); }
From source file:org.gogpsproject.parser.sp3.SP3Navigation.java
/** * @param args/*from w w w . ja va 2 s . co m*/ */ public static void main(String[] args) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); Calendar c = Calendar.getInstance(); // c.set(Calendar.YEAR, 2011); // c.set(Calendar.MONTH, 0); // c.set(Calendar.DAY_OF_MONTH, 9); // c.set(Calendar.HOUR_OF_DAY, 1); // c.set(Calendar.MINUTE, 0); // c.set(Calendar.SECOND, 0); // c.set(Calendar.MILLISECOND, 0); c.setTimeZone(new SimpleTimeZone(0, "")); Time t = new Time(c.getTimeInMillis()); System.out.println("ts: " + t.getMsec() + " " + (new Date(t.getMsec()))); System.out.println("week: " + t.getGpsWeek()); System.out.println("week sec: " + t.getGpsWeekSec()); System.out.println("week day: " + t.getGpsWeekDay()); System.out.println("week hour in day: " + t.getGpsHourInDay()); System.out.println("year: " + t.getYear() + " " + t.getYear2c()); System.out.println("day of year: " + t.getDayOfYear()); System.out.println("ts2: " + (new Time(t.getGpsWeek(), t.getGpsWeekSec())).getMsec()); // SP3Navigation sp3n = new SP3Navigation(IGN_FR_ULTRARAPID); // sp3n.init(); // SatellitePosition sp = sp3n.getGpsSatPosition(c.getTimeInMillis(), 2, 0, null); // if(sp!=null){ // System.out.println("found "+(new Date(sp.getUtcTime()))+" "+(sp.isPredicted()?" predicted":"")); // }else{ // System.out.println("Epoch not found "+(new Date(c.getTimeInMillis()))); // } }
From source file:gr.cti.android.experimentation.Application.java
public static void main(String[] args) throws Exception { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); final ConfigurableApplicationContext ctx = SpringApplication.run(Application.class, args); for (String name : ctx.getBeanDefinitionNames()) { LOGGER.info(name);//from ww w. j a v a 2 s . c o m } }
From source file:org.gogpsproject.parser.rinex.RinexNavigation.java
/** * @param args//from w ww .j a va 2 s .c o m */ public static void main(String[] args) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); Calendar c = Calendar.getInstance(); c.set(Calendar.YEAR, 2011); c.set(Calendar.MONTH, 0); c.set(Calendar.DAY_OF_MONTH, 9); c.set(Calendar.HOUR_OF_DAY, 1); c.set(Calendar.MINUTE, 0); c.set(Calendar.SECOND, 0); c.set(Calendar.MILLISECOND, 0); c.setTimeZone(new SimpleTimeZone(0, "")); Time t = new Time(c.getTimeInMillis()); System.out.println("ts: " + t.getMsec() + " " + (new Date(t.getMsec()))); System.out.println("week: " + t.getGpsWeek()); System.out.println("week sec: " + t.getGpsWeekSec()); System.out.println("week day: " + t.getGpsWeekDay()); System.out.println("week hour in day: " + t.getGpsHourInDay()); System.out.println("ts2: " + (new Time(t.getGpsWeek(), t.getGpsWeekSec())).getMsec()); RinexNavigation rn = new RinexNavigation(IGN_NAVIGATION_HOURLY_ZIM2); rn.init(); // SatellitePosition sp = rn.getGpsSatPosition(c.getTimeInMillis(), 2, 0, 0); Observations obs = new Observations(new Time(c.getTimeInMillis()), 0); SatellitePosition sp = rn.getGpsSatPosition(obs, 2, 'G', 0); if (sp != null) { System.out .println("found " + (new Date(sp.getUtcTime())) + " " + (sp.isPredicted() ? " predicted" : "")); } else { System.out.println("Epoch not found " + (new Date(c.getTimeInMillis()))); } }
From source file:com.devnexus.ting.DevNexusApplication.java
public static void main(String[] args) throws Exception { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); final SpringApplication application = new SpringApplication(DevNexusApplication.class); application.addInitializers(new DefaultApplicationContextInitializer()); application.run(args);/*from w w w. j a v a 2s .c om*/ }
From source file:org.wso2.bps.samples.migration.MigrationExecutor.java
public static void main(String[] args) { try {//from w w w . j a va2 s . c o m System.out.println("Initialize Migration..."); System.out.println("=========================================="); if (System.getProperty("carbon.home") != null) { System.out.println("Using carbon home directory : " + System.getProperty("carbon.home")); } else { System.out.println("Carbon Home not set, please check the migration tool script !!!!"); } //Get BPS HOME from bin directory BPS_HOME = System.getProperty("carbon.home"); //Load properties initializeDBConnection(); //Set time zone for oracle TimeZone.setDefault(TimeZone.getTimeZone(System.getProperty("user.timezone"))); //Repository Paths String superTenantRepoPath = BPS_HOME + File.separator + "repository" + File.separator + "deployment" + File.separator + "server" + File.separator + "humantasks"; String tenantsRepoPath = BPS_HOME + File.separator + "repository" + File.separator + "tenants"; System.out.println("SUPER TENANT REPOSITORY PATH:" + superTenantRepoPath); System.out.println("TENANTS REPOSITORY PATH:" + tenantsRepoPath); query = new DBQuery(databaseURL); //Check DB schemas Exist if (!versionDBSchemasExists()) { System.out.println("DB Tables are not updated for BPS 3.2.0. Please run the sql script from " + "dbscripts/migration directory and Try Again!!!!"); return; } //Migration for super tenant. migrateSuperTenantHTPacks(superTenantRepoPath); //Migration for tenants. migrateTenantsHTPacks(tenantsRepoPath); System.out.println("Migration Success!!!!"); } catch (Exception ex) { ex.printStackTrace(); System.out.println("ERROR:Migration failed.Try Again!!!!"); } }