Tags » Timezone

Changing date and timezone in Linux

I am on CentOS 6.5

You can use the date command to see the current time and timezone

$ date
Thu Sep 18 13:54:34 MDT 2014… 107 more words
Linux/Ubuntu

Now this is the right way to do it - webinar times in a big world

Kudos to ProjectTimes.

The Internet is a global thing. This means that anything that you publish on it could be read by pretty much anyone in the world. 115 more words

Fun

About to be Facebook-less…

Hello!

This morning my cousin and I made banana bread and FaceTimed with my brother Kaehler. Both of which were super fun! I know what all you Canadians are thinking… Baking?! 870 more words

New Zealand News

Jetlag

I sleep at night
Wake up at six
Then sleep again
At twelve
The plane it landed
It took me home
But left my body… 24 more words

Poetry

Time Zone Conversion

Here we are converting time from one zone to another.
public class ConvertToGMT {
 public static void main(String[] args) throws ParseException {
 Date date = new Date();
 TimeZone temp = TimeZone.getDefault();
 System.out.println(TimeZone.getDefault());
 
 TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
 Calendar tzCal = Calendar.getInstance();
 tzCal.setTime(date);
 System.out.println("Current DateTime :"+tzCal.getTime());
 
 covertToOther(tzCal.getTime(),"GMT+5:30");
 
 TimeZone.setDefault(temp);
 System.out.println(TimeZone.getDefault());
 }
 
 private static void covertToOther(Date timestamp,String reqTimeZone){
 Calendar tzCal = Calendar.getInstance();
 TimeZone.setDefault(TimeZone.getTimeZone(reqTimeZone));
 tzCal.setTime(timestamp);
 System.out.println("India "+tzCal.getTime());
 }
}

Output :
sun.util.calendar.ZoneInfo
Current DateTime :Thu Aug 21 11:19:51 GMT 2014
India Thu Aug 21 16:49:51 GMT+05:30 2014
sun.util.calendar.ZoneInfo
… 64 more words
Java

Back in Action

Hey World! I’m back in action…in more ways than one!

First, the blog.

It’s been a while, my goodness!  It turns out the combo of finishing up things in North Dakota, moving to Wisconsin, spending five busy weeks in Florida, moving back to Wisco for a month, not having a regular schedule, my lack of exciting (or funny) things to blog about and my laziness is a deadly combo for not blogging in over four months. 517 more words

Just For Fun