DateTime
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Representasi JSON |
{
"date": string
} |
Kolom |
date |
string
Tanggal/waktu format diperpanjang ISO 8601. Offset mungkin atau mungkin tidak diperlukan (lihat dokumentasi kolom induk). Waktu dapat ditentukan hingga presisi nanodetik. Offset dapat ditentukan dengan presisi detik (meskipun detik offset bukan bagian dari ISO 8601). Contoh: 1985-04-12T23:20:50.52Z akan menjadi 20 menit 50, 52 detik setelah jam ke-23 tanggal 12 April 1985 dalam UTC.
1985-04-12T19:20:50.52-04:00 akan menjadi 20 menit dan 50, 52 detik setelah jam ke-19 tanggal 12 April 1985, 4 jam sebelum UTC (waktu yang sama seperti contoh di atas). Jika tanggal/waktu ditujukan untuk lokasi fisik di New York, ini akan setara dengan Waktu Musim Panas Timur (EDT). Ingatlah bahwa ada perbedaan waktu di wilayah yang menerapkan Waktu Musim Panas (atau Waktu Musim Panas), bergantung pada waktu dalam setahun.
1985-04-12T19:20:50.52 akan menjadi 20 menit dan 50, 52 detik setelah jam ke-19 tanggal 12 April 1985 tanpa informasi offset.
Dengan memberikan offset, tindakan ini akan benar-benar terjadi secara instan di seluruh dunia. Tanggal/waktu akan disesuaikan berdasarkan zona waktu pengguna. Misalnya, waktu 2018-06-19T18:30:00-04:00 adalah 18.30.00 untuk pengguna di New York dan 15.30.00 untuk pengguna di Los Angeles. Menghilangkan offset menjadikan ini sebagai tanggal/waktu lokal, yang mewakili beberapa instan dalam waktu di seluruh dunia. Tanggal/waktu akan selalu berada dalam zona waktu pengguna saat ini. Misalnya, waktu 2018-06-19T18:30:00 adalah 18.30.00 untuk pengguna di New York dan juga 18.30.00 untuk pengguna di Los Angeles. Hal ini berguna ketika tanggal/waktu lokal yang sama harus berlaku untuk banyak lokasi fisik di beberapa zona waktu.
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[[["\u003cp\u003eThe JSON schema represents a date object.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edate\u003c/code\u003e field is a string that adheres to the ISO 8601 extended format for date and time.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edate\u003c/code\u003e field can include an offset to specify the time zone, or it can be omitted for local time representation.\u003c/p\u003e\n"],["\u003cp\u003eProviding an offset ensures the \u003ccode\u003edate\u003c/code\u003e represents a specific instant in time globally, while omitting it makes it a local time subject to user time zones.\u003c/p\u003e\n"]]],["The core information defines the `date` field within a JSON structure. The `date` is a string representing an ISO 8601 date/time, with optional offset information. It may include nanosecond precision. Providing an offset creates an absolute instant in time, adjusted to the user's timezone. Omitting the offset creates a local date/time, consistent across time zones. This format can represent times down to the nanosecond and offsets with second precision.\n"],null,["# DateTime\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\n| JSON representation |\n|----------------------------|\n| ``` { \"date\": string } ``` |\n\n| Fields ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `date` | `string` An ISO 8601 extended format date/time. Offset may or may not be required (refer to the parent field's documentation). Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the date/time is intended for a physical location in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. Providing an offset makes this an absolute instant in time around the world. The date/time will be adjusted based on the user's time zone. For example, a time of `2018-06-19T18:30:00-04:00` will be 18:30:00 for a user in New York and 15:30:00 for a user in Los Angeles. Omitting the offset makes this a local date/time, representing several instants in time around the world. The date/time will always be in the user's current time zone. For example, a time of `2018-06-19T18:30:00` will be 18:30:00 for a user in New York and also 18:30:00 for a user in Los Angeles. This is useful when the same local date/time should apply to many physical locations across several time zones. |"]]