Aracılığıyla paylaş


Date.ToGMTString Method

Definition

Caution

deprecated

Creates a string representation of this Date object of the form: <blockquote>

[Android.Runtime.Register("toGMTString", "()Ljava/lang/String;", "GetToGMTStringHandler")]
[System.Obsolete("deprecated")]
public virtual string? ToGMTString ();
[<Android.Runtime.Register("toGMTString", "()Ljava/lang/String;", "GetToGMTStringHandler")>]
[<System.Obsolete("deprecated")>]
abstract member ToGMTString : unit -> string
override this.ToGMTString : unit -> string

Returns

a string representation of this date, using the Internet GMT conventions.

Attributes

Remarks

Creates a string representation of this Date object of the form: <blockquote>

d mon yyyy hh:mm:ss GMT

</blockquote> where:<ul> <li>d is the day of the month (1 through 31), as one or two decimal digits. <li>mon is the month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec). <li>yyyy is the year, as four decimal digits. <li>hh is the hour of the day (00 through 23), as two decimal digits. <li>mm is the minute within the hour (00 through 59), as two decimal digits. <li>ss is the second within the minute (00 through 61), as two decimal digits. <li>GMT is exactly the ASCII letters "GMT" to indicate Greenwich Mean Time. </ul>

The result does not depend on the local time zone.

This member is deprecated. As of JDK version 1.1, replaced by DateFormat.format(Date date), using a GMT TimeZone.

Java documentation for java.util.Date.toGMTString().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to