Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class Http1Date

  1. Object
  2. Http1Date

The one date format HTTP/1.1 requires on the wire (“Sun, 06 Nov 1994 08:49:37 GMT”), formatted and parsed from epoch milliseconds directly.

Done arithmetically rather than through Calendar and TimeZone: the format is fixed and always GMT, and going through a calendar would make a header depend on the process’s default time zone, which is how Last-Modified ends up hours off on a machine that is not in UTC.

Methods

public static String format(long millis)
public static long parse(String value)Epoch millis, or -1 when the value is not a date this understands.

Inherited methods

Method details

format

public static String format(long millis)

parse

public static long parse(String value)
Epoch millis, or -1 when the value is not a date this understands.