NSDate(AWS)

@interface NSDate (AWS)

+ (NSDate *)aws_clockSkewFixedDate;

+ (NSDate *)aws_dateFromString:(NSString *)string;
+ (NSDate *)aws_dateFromString:(NSString *)string format:(NSString *)dateFormat;
- (NSString *)aws_stringValue:(NSString *)dateFormat;

/**
 * Set the clock skew for the current device.  This clock skew will be used for calculating
 * signatures to AWS signatures and for parsing/converting date values from responses.
 *
 * @param clockskew the skew (in seconds) for this device.  If the clock on the device is fast, pass positive skew to correct.  If the clock on the device is slow, pass negative skew to correct.
 */
+ (void)aws_setRuntimeClockSkew:(NSTimeInterval)clockskew;

/**
 * Get the clock skew for the current device.
 *
 * @return the skew (in seconds) currently set for this device.  Positive clock skew implies the device is fast, negative implies the device is slow.
 */
+ (NSTimeInterval)aws_getRuntimeClockSkew;

@end

Undocumented

  • Undocumented

    Declaration

    Objective-C

    + (NSDate *)aws_clockSkewFixedDate;

    Swift

    class func aws_clockSkewFixed() -> Date!
  • Undocumented

    Declaration

    Objective-C

    + (NSDate *)aws_dateFromString:(NSString *)string;

    Swift

    class func aws_date(from string: String!) -> Date!
  • Undocumented

    Declaration

    Objective-C

    + (NSDate *)aws_dateFromString:(NSString *)string format:(NSString *)dateFormat;

    Swift

    class func aws_date(from string: String!, format dateFormat: String!) -> Date!
  • Undocumented

    Declaration

    Objective-C

    - (NSString *)aws_stringValue:(NSString *)dateFormat;

    Swift

    func aws_stringValue(_ dateFormat: String!) -> String!
  • Set the clock skew for the current device. This clock skew will be used for calculating signatures to AWS signatures and for parsing/converting date values from responses.

    Declaration

    Objective-C

    + (void)aws_setRuntimeClockSkew:(NSTimeInterval)clockskew;

    Swift

    class func aws_setRuntimeClockSkew(_ clockskew: TimeInterval)

    Parameters

    clockskew

    the skew (in seconds) for this device. If the clock on the device is fast, pass positive skew to correct. If the clock on the device is slow, pass negative skew to correct.

  • Get the clock skew for the current device.

    Declaration

    Objective-C

    + (NSTimeInterval)aws_getRuntimeClockSkew;

    Swift

    class func aws_getRuntimeClockSkew() -> TimeInterval

    Return Value

    the skew (in seconds) currently set for this device. Positive clock skew implies the device is fast, negative implies the device is slow.