Home
last modified time | relevance | path

Searched refs:FixedOffset (Results 1 – 22 of 22) sorted by relevance

/external/rust/crates/chrono/src/offset/
Dfixed.rs23 pub struct FixedOffset { struct
27 impl FixedOffset { impl
42 pub fn east(secs: i32) -> FixedOffset { in east() argument
43 FixedOffset::east_opt(secs).expect("FixedOffset::east out of bounds") in east()
50 pub fn east_opt(secs: i32) -> Option<FixedOffset> { in east_opt() argument
52 Some(FixedOffset { local_minus_utc: secs }) in east_opt()
72 pub fn west(secs: i32) -> FixedOffset { in west() argument
73 FixedOffset::west_opt(secs).expect("FixedOffset::west out of bounds") in west()
80 pub fn west_opt(secs: i32) -> Option<FixedOffset> { in west_opt() argument
82 Some(FixedOffset { local_minus_utc: -secs }) in west_opt()
[all …]
Dlocal.rs9 use super::fixed::FixedOffset;
46 let offset = FixedOffset::east(tm.tm_utcoff); in tm_to_datetime()
112 let offset = FixedOffset::west((js_sys::Date::new_0().get_timezone_offset() as i32) * 60); in now()
118 type Offset = FixedOffset;
120 fn from_offset(_offset: &FixedOffset) -> Local { in from_offset()
125 fn offset_from_local_date(&self, local: &NaiveDate) -> LocalResult<FixedOffset> { in offset_from_local_date() argument
129 fn offset_from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<FixedOffset> { in offset_from_local_datetime() argument
133 fn offset_from_utc_date(&self, utc: &NaiveDate) -> FixedOffset { in offset_from_utc_date() argument
137 fn offset_from_utc_datetime(&self, utc: &NaiveDateTime) -> FixedOffset { in offset_from_utc_datetime() argument
154 let offset = FixedOffset::west((js_sys::Date::new_0().get_timezone_offset() as i32) * 60); in from_local_datetime()
[all …]
Dutc.rs8 use super::{FixedOffset, LocalResult, Offset, TimeZone};
85 fn fix(&self) -> FixedOffset { in fix() argument
86 FixedOffset::east(0) in fix()
Dmod.rs185 fn fix(&self) -> FixedOffset; in fix() argument
469 pub use self::fixed::FixedOffset;
/external/rust/crates/chrono/src/
Ddatetime.rs29 use offset::{FixedOffset, Offset, TimeZone, Utc};
257 impl From<DateTime<Utc>> for DateTime<FixedOffset> {
263 src.with_timezone(&FixedOffset::east(0)) in from()
279 impl From<DateTime<FixedOffset>> for DateTime<Utc> {
284 fn from(src: DateTime<FixedOffset>) -> Self { in from()
291 impl From<DateTime<FixedOffset>> for DateTime<Local> {
296 fn from(src: DateTime<FixedOffset>) -> Self { in from()
315 impl From<DateTime<Local>> for DateTime<FixedOffset> {
321 src.with_timezone(&FixedOffset::east(0)) in from()
333 impl DateTime<FixedOffset> {
[all …]
Dround.rs271 use offset::{FixedOffset, TimeZone, Utc};
276 let pst = FixedOffset::east(8 * 60 * 60); in test_round_subsecs()
319 let pst = FixedOffset::east(8 * 60 * 60); in test_trunc_subsecs()
Dlib.rs502 pub use offset::{FixedOffset, LocalResult, Offset, TimeZone, Utc};
522 pub use {FixedOffset, Utc};
/external/rust/crates/chrono/tests/
Dwasm.rs32 "ACST-9:30" => FixedOffset::east(19 * 30 * 60), in now()
33 "Asia/Katmandu" => FixedOffset::east(23 * 15 * 60), // No DST thankfully in now()
34 "EDT" | "EST4" | "-0400" => FixedOffset::east(-4 * 60 * 60), in now()
35 "EST" | "-0500" => FixedOffset::east(-5 * 60 * 60), in now()
36 "UTC0" | "+0000" => FixedOffset::east(0), in now()
/external/python/cpython2/Lib/test/
Dtest_datetime.py43 class FixedOffset(tzinfo): class
61 class PicklableFixedOffset(FixedOffset):
63 FixedOffset.__init__(self, offset, name, dstoffset)
92 fo = FixedOffset(3, "Three")
1309 class MyTzInfo(FixedOffset):
1681 f = FixedOffset(44, "")
2209 est = FixedOffset(-300, "EST", 1)
2210 utc = FixedOffset(0, "UTC", -2)
2211 met = FixedOffset(60, "MET", 3)
2277 yuck = FixedOffset(-1439, "%z %Z %%z%%Z")
[all …]
/external/llvm-project/llvm/include/llvm/Support/
DOptimizedStructLayout.h50 uint64_t FixedOffset = FlexibleOffset)
51 : Offset(FixedOffset), Size(Size), Id(Id), Alignment(Alignment) { in Offset()
/external/rust/crates/chrono/benches/
Dchrono.rs9 use chrono::{DateTime, FixedOffset, Utc, __BenchYearFlags};
40 let pst = FixedOffset::east(8 * 60 * 60); in bench_datetime_to_rfc2822()
46 let pst = FixedOffset::east(8 * 60 * 60); in bench_datetime_to_rfc3339()
/external/python/pyasn1/pyasn1/type/
Duseful.py41 class FixedOffset(datetime.tzinfo): class in TimeMixIn
59 UTC = FixedOffset()
95 tzinfo = TimeMixIn.FixedOffset(minutes, '?')
/external/python/pyasn1/tests/type/
Dtest_useful.py23 class FixedOffset(datetime.tzinfo): class
38 UTC = FixedOffset(0, 'UTC')
39 UTC2 = FixedOffset(120, 'UTC')
/external/rust/crates/chrono/src/format/
Dparsed.rs13 use offset::{FixedOffset, LocalResult, Offset, TimeZone};
644 pub fn to_fixed_offset(&self) -> ParseResult<FixedOffset> { in to_fixed_offset() argument
645 self.offset.and_then(FixedOffset::east_opt).ok_or(OUT_OF_RANGE) in to_fixed_offset()
654 pub fn to_datetime(&self) -> ParseResult<DateTime<FixedOffset>> { in to_datetime() argument
657 let offset = FixedOffset::east_opt(offset).ok_or(OUT_OF_RANGE)?; in to_datetime()
725 use offset::{FixedOffset, TimeZone, Utc};
1201 Ok(FixedOffset::east(off).ymd(y, m, d).and_hms_nano(h, n, s, nano)) in test_parsed_to_datetime()
1254 parse!(FixedOffset::east(32400); in test_parsed_to_datetime_with_timezone()
1260 parse!(FixedOffset::east(32400); in test_parsed_to_datetime_with_timezone()
1263 Ok(FixedOffset::east(32400).ymd(2014, 12, 31).and_hms_nano(13, 26, 40, 12_345_678)) in test_parsed_to_datetime_with_timezone()
[all …]
Dmod.rs34 use offset::{FixedOffset, Offset};
395 off: Option<&(String, FixedOffset)>, in format_item() argument
408 off: Option<&(String, FixedOffset)>, in format_inner() argument
530 off: FixedOffset, in format_inner() argument
693 off: Option<&(String, FixedOffset)>, in format() argument
725 off: Option<(String, FixedOffset)>,
858 off: Option<&(String, FixedOffset)>, in format_item_localized() argument
874 off: Option<&(String, FixedOffset)>, in format_localized() argument
Dparse.rs17 use {DateTime, FixedOffset, Weekday};
458 impl str::FromStr for DateTime<FixedOffset> {
461 fn from_str(s: &str) -> ParseResult<DateTime<FixedOffset>> { in from_str() argument
801 use offset::FixedOffset; in test_rfc2822()
825 fn rfc2822_to_datetime(date: &str) -> ParseResult<DateTime<FixedOffset>> { in test_rfc2822() argument
831 fn fmt_rfc2822_datetime(dt: DateTime<FixedOffset>) -> String { in test_rfc2822()
889 use offset::FixedOffset; in test_rfc3339()
908 fn rfc3339_to_datetime(date: &str) -> ParseResult<DateTime<FixedOffset>> { in test_rfc3339() argument
914 fn fmt_rfc3339_datetime(dt: DateTime<FixedOffset>) -> String { in test_rfc3339()
Dstrftime.rs543 use {FixedOffset, TimeZone, Timelike}; in test_strftime_docs()
545 let dt = FixedOffset::east(34200).ymd(2001, 7, 8).and_hms_nano(0, 34, 59, 1_026_490_708); in test_strftime_docs()
621 use {FixedOffset, TimeZone}; in test_strftime_docs_localized()
623 let dt = FixedOffset::east(34200).ymd(2001, 7, 8).and_hms_nano(0, 34, 59, 1_026_490_708); in test_strftime_docs_localized()
/external/python/cpython3/Lib/test/
Ddatetimetester.py115 class FixedOffset(tzinfo): class
134 class PicklableFixedOffset(FixedOffset):
137 FixedOffset.__init__(self, offset, name, dstoffset)
179 fo = FixedOffset(3, "Three")
2035 tz = FixedOffset(timedelta(seconds=16), 'XXX')
2134 class MyTzInfo(FixedOffset):
2752 f = FixedOffset(44, "0044")
3640 est = FixedOffset(-300, "EST", 1)
3641 utc = FixedOffset(0, "UTC", -2)
3642 met = FixedOffset(60, "MET", 3)
[all …]
/external/rust/crates/chrono/
DCHANGELOG.md206 * Derive `Hash` on `FixedOffset` (@LuoZijun #254)
299 `chrono::offset::fixed::FixedOffset` | `chrono::offset::FixedOffset`
375 - `FixedOffset` can be added to or subtracted from any timelike types.
377 - `FixedOffset::local_minus_utc` and `FixedOffset::utc_minus_local` methods have been added.
406 - `Offset::local_minus_utc` is now `Offset::fix`, and returns `FixedOffset` instead of a duration.
411 - `chrono::format::format` now receives `FixedOffset` instead of `time::Duration`.
445 Use a direct addition with `FixedOffset` instead.
614 Some types (currently, `UTC` and `FixedOffset`) are both `TimeZone` and `Offset`,
637 - `parse_from_str` method has been added to all naive types and `DateTime<FixedOffset>`.
639 - All naive types and instances of `DateTime` with time zones `UTC`, `Local` and `FixedOffset`
DREADME.md127 * [**`FixedOffset`**](https://docs.rs/chrono/0.4/chrono/offset/struct.FixedOffset.html) specifies
176 let fixed_dt = FixedOffset::east(9 * 3600).ymd(2014, 7, 8).and_hms_milli(18, 10, 11, 12);
192 let dt = FixedOffset::east(9*3600).ymd(2014, 11, 28).and_hms_nano(21, 45, 59, 324310806);
205 assert_eq!(dt.timezone(), FixedOffset::east(9 * 3600));
270 on a string) can be used for parsing `DateTime<FixedOffset>`, `DateTime<Utc>` and
276 a date and time with offsets and returns `DateTime<FixedOffset>`.
297 let fixed_dt = dt.with_timezone(&FixedOffset::east(9*3600));
302 assert_eq!("2014-11-28T21:00:09+09:00".parse::<DateTime<FixedOffset>>(), Ok(fixed_dt.clone()));
/external/python/cpython2/Doc/includes/
Dtzinfo-examples.py26 class FixedOffset(tzinfo): class
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/
DAArch64FrameLowering.cpp2539 int64_t FixedOffset = -MFI.getObjectOffset(I); in determineSVEStackObjectOffsets() local
2540 if (FixedOffset > Offset) in determineSVEStackObjectOffsets()
2541 Offset = FixedOffset; in determineSVEStackObjectOffsets()