Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSTimeZone


    public NSTimestamp desiredTimestamp;

    public String desiredTimestampInDesiredTimeZone() {
      NSTimestampFormatter formatter = new NSTimestampFormatter();
      NSTimeZone tz = NSTimeZone.timeZoneWithName(timeZoneID, false);
      formatter.setDefaultFormatTimeZone(tz);
      StringBuffer buffer = formatter.format(_currentTimestamp, new StringBuffer(), new FieldPosition(0));
      return buffer.toString();
    }
View Full Code Here


                    ERXSession.class.isAssignableFrom(wocontext.session().getClass())
                        ) {
               
              synchronized(format) {
                ERXSession session = (ERXSession)wocontext.session();
                NSTimeZone zone = NSTimeZone._nstimeZoneWithTimeZone(session.timeZone());
                NSTimestampFormatter tsFormat = (NSTimestampFormatter)format;
                NSTimeZone parseZone = tsFormat.defaultParseTimeZone();
                NSTimeZone formatZone = tsFormat.defaultFormatTimeZone();
                tsFormat.setDefaultFormatTimeZone(zone);
                tsFormat.setDefaultParseTimeZone(zone);
                try {
                  Object parsedObject = format.parseObject(stringValue);
                  String reformatedObject = format.format(parsedObject);
View Full Code Here

            ERXSession.class.isAssignableFrom(wocontext.session().getClass())
                ) {
           
          synchronized(format) {
            ERXSession session = (ERXSession)wocontext.session();
            NSTimeZone zone = NSTimeZone._nstimeZoneWithTimeZone(session.timeZone());
            NSTimestampFormatter tsFormat = (NSTimestampFormatter)format;
            NSTimeZone parseZone = tsFormat.defaultParseTimeZone();
            NSTimeZone formatZone = tsFormat.defaultFormatTimeZone();
            tsFormat.setDefaultFormatTimeZone(zone);
            tsFormat.setDefaultParseTimeZone(zone);
            try {
              String formatedValue = format.format(valueInComponent);
              Object reparsedObject = format.parseObject(formatedValue);
View Full Code Here

                    ERXSession.class.isAssignableFrom(wocontext.session().getClass())
                        ) {
               
              synchronized(format) {
                ERXSession session = (ERXSession)wocontext.session();
                NSTimeZone zone = NSTimeZone._nstimeZoneWithTimeZone(session.timeZone());
                NSTimestampFormatter tsFormat = (NSTimestampFormatter)format;
                NSTimeZone parseZone = tsFormat.defaultParseTimeZone();
                NSTimeZone formatZone = tsFormat.defaultFormatTimeZone();
                tsFormat.setDefaultFormatTimeZone(zone);
                tsFormat.setDefaultParseTimeZone(zone);
                        try {
                                valueInComponent = format.format(valueInComponent);
                            } catch (IllegalArgumentException ex) {
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSTimeZone

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.