package bigloo;

import java.util.*;

public class date extends obj {
  public Calendar calendar;
  public int timezone;

  public date( final int s,
               final int min,
               final int h,
               final int d,
               final int mon,
               final int y,
               final long tz,
	       final int dst ) {
     if( tz == 0 ) {
	calendar = new GregorianCalendar( y, mon, d, h, min, s );
	timezone = 0;
     } else {
      final String id = TimeZone.getAvailableIDs( ((int)tz) * 1000)[0];
      final TimeZone tmz = new SimpleTimeZone( ((int)tz) * 1000, id );
      final Calendar cal = new GregorianCalendar( tmz );

      calendar.set( y, mon, d, h, min );
      timezone = (int)tz;
    }
  }

   public date( final long seconds ) {
      calendar = new GregorianCalendar();
      final Date d = new Date();
	 
      d.setTime( seconds * 1000 );
      calendar.setTime( d );
   }
}
