Home
last modified time | relevance | path

Searched refs:DateTime (Results 1 – 25 of 188) sorted by relevance

12345678

/external/rust/crates/chrono/src/
Ddatetime.rs70 pub struct DateTime<Tz: TimeZone> { struct
76 pub const MIN_DATETIME: DateTime<Utc> = DateTime { datetime: naive::MIN_DATETIME, offset: Utc };
78 pub const MAX_DATETIME: DateTime<Utc> = DateTime { datetime: naive::MAX_DATETIME, offset: Utc };
80 impl<Tz: TimeZone> DateTime<Tz> { impl
95 pub fn from_utc(datetime: NaiveDateTime, offset: Tz::Offset) -> DateTime<Tz> { in from_utc()
96 DateTime { datetime: datetime, offset: offset } in from_utc()
212 pub fn with_timezone<Tz2: TimeZone>(&self, tz: &Tz2) -> DateTime<Tz2> { in with_timezone()
220 pub fn checked_add_signed(self, rhs: OldDuration) -> Option<DateTime<Tz>> { in checked_add_signed()
230 pub fn checked_sub_signed(self, rhs: OldDuration) -> Option<DateTime<Tz>> { in checked_sub_signed()
239 pub fn signed_duration_since<Tz2: TimeZone>(self, rhs: DateTime<Tz2>) -> OldDuration { in signed_duration_since()
[all …]
/external/rust/crates/zip/src/
Dtypes.rs36 pub struct DateTime { struct
45 impl ::std::default::Default for DateTime { argument
47 fn default() -> DateTime { in default()
48 DateTime { in default()
59 impl DateTime { impl
61 pub fn from_msdos(datepart: u16, timepart: u16) -> DateTime { in from_msdos() argument
69 DateTime { in from_msdos()
95 ) -> Result<DateTime, ()> { in from_date_and_time() argument
106 Ok(DateTime { in from_date_and_time()
123 pub fn from_time(tm: ::time::Tm) -> Result<DateTime, ()> { in from_time() argument
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Internal/
DTimespecTest.cs39 var utcNow = DateTime.UtcNow; in Now_AgreesWithUtcNow()
72 Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc), in ToDateTime()
75 Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 10, DateTimeKind.Utc).AddTicks(50), in ToDateTime()
78 Assert.AreEqual(new DateTime(2015, 7, 21, 4, 21, 48, DateTimeKind.Utc), in ToDateTime()
82 Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 55, DateTimeKind.Utc).AddTicks(10), in ToDateTime()
86 Assert.AreEqual(DateTime.MaxValue, Timespec.InfFuture.ToDateTime()); in ToDateTime()
87 Assert.AreEqual(DateTime.MinValue, Timespec.InfPast.ToDateTime()); in ToDateTime()
90 Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddTicks(1), in ToDateTime()
114 Assert.AreEqual(DateTime.MaxValue, timespec.ToDateTime()); in ToDateTime_Overflow()
116 Assert.AreEqual(DateTime.MinValue, new Timespec(long.MinValue + 100, 0).ToDateTime()); in ToDateTime_Overflow()
[all …]
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DTimestampTest.cs43 DateTime utcMin = DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Utc); in FromAndToDateTime()
44 DateTime utcMax = DateTime.SpecifyKind(DateTime.MaxValue, DateTimeKind.Utc); in FromAndToDateTime()
47 AssertRoundtrip(new Timestamp(), new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)); in FromAndToDateTime()
48 …AssertRoundtrip(new Timestamp { Nanos = 1000000}, new DateTime(1970, 1, 1, 0, 0, 0, 1, DateTimeKin… in FromAndToDateTime()
49 …AssertRoundtrip(new Timestamp { Seconds = -1, Nanos = 999000000 }, new DateTime(1969, 12, 31, 23, … in FromAndToDateTime()
50 …AssertRoundtrip(new Timestamp { Seconds = 3600 }, new DateTime(1970, 1, 1, 1, 0, 0, DateTimeKind.U… in FromAndToDateTime()
51 …AssertRoundtrip(new Timestamp { Seconds = -3600 }, new DateTime(1969, 12, 31, 23, 0, 0, DateTimeKi… in FromAndToDateTime()
58 …Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 1, DateTimeKind.Utc).AddMilliseconds(1), t1.ToDateT… in ToDateTimeTruncation()
61 … Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 59).AddMilliseconds(1), t2.ToDateTime()); in ToDateTimeTruncation()
87 private static void AssertRoundtrip(Timestamp timestamp, DateTime dateTime) in AssertRoundtrip()
/external/grpc-grpc/src/csharp/Grpc.Core/Internal/
DTimespec.cs35 static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
127 public DateTime ToDateTime() in ToDateTime()
135 return DateTime.MaxValue; in ToDateTime()
141 return DateTime.MinValue; in ToDateTime()
154 return tv_sec > 0 ? DateTime.MaxValue : DateTime.MinValue; in ToDateTime()
159 return tv_sec > 0 ? DateTime.MaxValue : DateTime.MinValue; in ToDateTime()
171 public static Timespec FromDateTime(DateTime dateTime) in FromDateTime()
173 if (dateTime == DateTime.MaxValue) in FromDateTime()
178 if (dateTime == DateTime.MinValue) in FromDateTime()
/external/openscreen/cast/common/certificate/
Dtypes.h20 struct DateTime { struct
29 bool operator<(const DateTime& a, const DateTime& b); argument
30 bool operator>(const DateTime& a, const DateTime& b);
31 bool DateTimeFromSeconds(uint64_t seconds, DateTime* time);
34 std::chrono::seconds DateTimeToSeconds(const DateTime& time);
Dcast_crl.cc75 const DateTime& time, in VerifyCRL()
77 DateTime* overall_not_after) { in VerifyCRL()
94 DateTime not_before; in VerifyCRL()
98 DateTime not_after; in VerifyCRL()
116 DateTime cert_not_after; in VerifyCRL()
140 CastCRL::CastCRL(const TbsCrl& tbs_crl, const DateTime& overall_not_after) { in CastCRL()
171 const DateTime& time) const { in CheckRevocation()
221 const DateTime& time, in ParseAndVerifyCRL()
241 DateTime overall_not_after; in ParseAndVerifyCRL()
Dcast_crl.h34 CastCRL(const TbsCrl& tbs_crl, const DateTime& overall_not_after);
50 const DateTime& time) const;
58 DateTime not_before_;
59 DateTime not_after_;
88 const DateTime& time,
Dtypes.cc12 bool operator<(const DateTime& a, const DateTime& b) { in operator <()
46 bool operator>(const DateTime& a, const DateTime& b) { in operator >()
50 bool DateTimeFromSeconds(uint64_t seconds, DateTime* time) { in DateTimeFromSeconds()
79 std::chrono::seconds DateTimeToSeconds(const DateTime& time) { in DateTimeToSeconds()
Dcast_cert_validator_internal.h50 struct DateTime;
59 bool ParseAsn1GeneralizedTime(ASN1_GENERALIZEDTIME* time, DateTime* out);
61 DateTime* not_before,
62 DateTime* not_after);
71 const DateTime& time,
/external/llvm-project/llvm/test/CodeGen/X86/
Dpr34080-2.ll4 %struct.DateTime = type { i64, i32, i32, i32, i32, i32, double, i8 }
6 define void @computeJD(%struct.DateTime*) nounwind {
87 %2 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 7
88 %3 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 1
90 %5 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 2
92 %7 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 3
116 %31 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 0
118 %32 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 4
121 %35 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 5
126 %40 = getelementptr inbounds %struct.DateTime, %struct.DateTime* %0, i32 0, i32 6
/external/rust/crates/chrono/src/offset/
Dlocal.rs14 use {Date, DateTime};
21 fn tm_to_datetime(mut tm: sys::Tm) -> DateTime<Local> { in tm_to_datetime()
47 DateTime::from_utc(date.and_time(time) - offset, offset) in tm_to_datetime()
101 pub fn now() -> DateTime<Local> { in now()
107 pub fn now() -> DateTime<Local> { in now()
109 let now: DateTime<Utc> = super::Utc::now(); in now()
113 DateTime::from_utc(now.naive_utc(), offset) in now()
151 fn from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<DateTime<Local>> { in from_local_datetime()
156 LocalResult::Single(DateTime::from_utc(local, offset)) in from_local_datetime()
160 fn from_local_datetime(&self, local: &NaiveDateTime) -> LocalResult<DateTime<Local>> { in from_local_datetime()
[all …]
Dmod.rs26 use {Date, DateTime};
82 pub fn and_time(self, time: NaiveTime) -> LocalResult<DateTime<Tz>> { in and_time()
96 pub fn and_hms_opt(self, hour: u32, min: u32, sec: u32) -> LocalResult<DateTime<Tz>> { in and_hms_opt()
117 ) -> LocalResult<DateTime<Tz>> { in and_hms_milli_opt()
138 ) -> LocalResult<DateTime<Tz>> { in and_hms_micro_opt()
159 ) -> LocalResult<DateTime<Tz>> { in and_hms_nano_opt()
324 fn timestamp(&self, secs: i64, nsecs: u32) -> DateTime<Self> { in timestamp()
334 fn timestamp_opt(&self, secs: i64, nsecs: u32) -> LocalResult<DateTime<Self>> { in timestamp_opt()
354 fn timestamp_millis(&self, millis: i64) -> DateTime<Self> { in timestamp_millis()
375 fn timestamp_millis_opt(&self, millis: i64) -> LocalResult<DateTime<Self>> { in timestamp_millis_opt()
[all …]
Dutc.rs16 use {Date, DateTime};
47 pub fn now() -> DateTime<Utc> { in now()
51 DateTime::from_utc(naive, Utc) in now()
56 pub fn now() -> DateTime<Utc> { in now()
58 DateTime::<Utc>::from(now) in now()
Dfixed.rs13 use DateTime;
200 impl<Tz: TimeZone> Add<FixedOffset> for DateTime<Tz> { implementation
201 type Output = DateTime<Tz>;
204 fn add(self, rhs: FixedOffset) -> DateTime<Tz> { in add()
209 impl<Tz: TimeZone> Sub<FixedOffset> for DateTime<Tz> { implementation
210 type Output = DateTime<Tz>;
213 fn sub(self, rhs: FixedOffset) -> DateTime<Tz> { in sub()
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DTimestampTest.cs43 DateTime utcMin = DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Utc); in FromAndToDateTime()
44 DateTime utcMax = DateTime.SpecifyKind(DateTime.MaxValue, DateTimeKind.Utc); in FromAndToDateTime()
47 AssertRoundtrip(new Timestamp(), new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)); in FromAndToDateTime()
48 …AssertRoundtrip(new Timestamp { Nanos = 1000000}, new DateTime(1970, 1, 1, 0, 0, 0, 1, DateTimeKin… in FromAndToDateTime()
49 …AssertRoundtrip(new Timestamp { Seconds = -1, Nanos = 999000000 }, new DateTime(1969, 12, 31, 23, … in FromAndToDateTime()
50 …AssertRoundtrip(new Timestamp { Seconds = 3600 }, new DateTime(1970, 1, 1, 1, 0, 0, DateTimeKind.U… in FromAndToDateTime()
51 …AssertRoundtrip(new Timestamp { Seconds = -3600 }, new DateTime(1969, 12, 31, 23, 0, 0, DateTimeKi… in FromAndToDateTime()
58 …Assert.AreEqual(new DateTime(1970, 1, 1, 0, 0, 1, DateTimeKind.Utc).AddMilliseconds(1), t1.ToDateT… in ToDateTimeTruncation()
61 … Assert.AreEqual(new DateTime(1969, 12, 31, 23, 59, 59).AddMilliseconds(1), t2.ToDateTime()); in ToDateTimeTruncation()
87 private static void AssertRoundtrip(Timestamp timestamp, DateTime dateTime) in AssertRoundtrip()
/external/antlr/runtime/CSharp3/Sources/Antlr3.Runtime.Test/
DTestFastLexer.cs67 DateTime start = DateTime.Now; in Iterate()
76 return DateTime.Now - start; in Iterate()
81 DateTime start = DateTime.Now; in IterateFast()
91 return DateTime.Now - start; in IterateFast()
/external/snakeyaml/src/test/java/examples/jodatime/
DJodaTimeExampleTest.java23 import org.joda.time.DateTime;
37 DateTime time = new DateTime(timestamp, DateTimeZone.UTC); in testDump()
47 DateTime time = (DateTime) yaml.load("2001-09-09T01:46:40Z"); in testLoad()
48 assertEquals(new DateTime(timestamp, DateTimeZone.UTC), time); in testLoad()
75 return new DateTime(date, DateTimeZone.UTC); in construct()
105 return new DateTime(date, DateTimeZone.UTC); in construct()
DMyBean.java18 import org.joda.time.DateTime;
22 private DateTime date;
32 public DateTime getDate() { in getDate()
36 public void setDate(DateTime date) { in setDate()
DJodaTimeRepresenter.java20 import org.joda.time.DateTime;
26 multiRepresenters.put(DateTime.class, new RepresentJodaDateTime()); in JodaTimeRepresenter()
32 DateTime date = (DateTime) data; in representData()
/external/rust/crates/rusqlite/src/types/
Dchrono.rs5 use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
86 impl<Tz: TimeZone> ToSql for DateTime<Tz> { implementation
93 impl FromSql for DateTime<Utc> { implementation
111 if let Ok(dt) = DateTime::parse_from_rfc3339(&s) { in column_result()
122 impl FromSql for DateTime<Local> { implementation
124 let utc_dt = DateTime::<Utc>::column_result(value)?; in column_result()
132 use chrono::{DateTime, Duration, Local, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Utc};
218 let v1: DateTime<Utc> = db in test_date_time_utc()
223 let v2: DateTime<Utc> = db in test_date_time_utc()
228 let v3: DateTime<Utc> = db in test_date_time_utc()
[all …]
/external/rust/crates/chrono/
DREADME.md108 [**`DateTime`**](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html)
118 `DateTime` is timezone-aware and must be constructed from
133 `DateTime`s with different `TimeZone` types are distinct and do not mix,
135 the [`DateTime::with_timezone`](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html#method.with_…
145 let utc: DateTime<Utc> = Utc::now(); // e.g. `2014-11-28T12:45:59.324310806Z`
146 let local: DateTime<Local> = Local::now(); // e.g. `2014-11-28T21:45:59.324310806+09:00`
226 Formatting is done via the [`format`](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html#method…
233 Chrono also provides [`to_rfc2822`](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html#method.t…
234 [`to_rfc3339`](https://docs.rs/chrono/0.4/chrono/struct.DateTime.html#method.to_rfc3339) methods
270 on a string) can be used for parsing `DateTime<FixedOffset>`, `DateTime<Utc>` and
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/
DChannelConnectivityTest.cs61 …async () => await channel.WaitForStateChangedAsync(channel.State, DateTime.UtcNow.AddMilliseconds(… in Channel_WaitForStateChangedAsync()
64 await channel.ConnectAsync(DateTime.UtcNow.AddMilliseconds(5000)); in Channel_WaitForStateChangedAsync()
72 …Assert.IsFalse(await channel.TryWaitForStateChangedAsync(channel.State, DateTime.UtcNow.AddMillise… in Channel_TryWaitForStateChangedAsync()
75 await channel.ConnectAsync(DateTime.UtcNow.AddMilliseconds(5000)); in Channel_TryWaitForStateChangedAsync()
86 await channel.ConnectAsync(DateTime.UtcNow.AddMilliseconds(1000)); in Channel_ConnectAsync()
DTimeoutsTest.cs62 Assert.AreEqual(DateTime.MaxValue, context.Deadline); in InfiniteDeadline()
70 …alls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.MaxValue)), "abc"… in InfiniteDeadline()
76 var clientDeadline = DateTime.UtcNow + TimeSpan.FromDays(7); in DeadlineTransferredToServer()
98 …alls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.MinValue)), "abc"… in DeadlineInThePast()
112 …alls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.UtcNow.Add(TimeSp… in DeadlineExceededStatusOnTimeout()
132 …alls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.UtcNow.Add(TimeSp… in ServerReceivesCancellationOnTimeout()
/external/openscreen/cast/sender/channel/
Dcast_auth_util.cc194 DateTime not_before; in VerifyTLSCertificateValidity()
195 DateTime not_after; in VerifyTLSCertificateValidity()
204 DateTime verification_time_exploded = {}; in VerifyTLSCertificateValidity()
205 DateTime lifetime_limit_exploded = {}; in VerifyTLSCertificateValidity()
232 const DateTime& verification_time,
242 const DateTime& verification_time) { in AuthenticateChallengeReplyImpl()
286 DateTime now = {}; in AuthenticateChallengeReply()
301 const DateTime& verification_time) { in AuthenticateChallengeReplyForTest()
330 const DateTime& verification_time, in VerifyCredentialsImpl()
392 DateTime now = {}; in VerifyCredentials()
[all …]

12345678