Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Date (0.14 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

          .isEqualTo(date("1950-01-01T00:00:00.000+0000").time)
        assertThat(Adapters.parseUtcTime("500101010000Z"))
          .isEqualTo(date("1950-01-01T01:00:00.000+0000").time)
    
        assertThat(Adapters.parseUtcTime("491231225959Z"))
          .isEqualTo(date("2049-12-31T22:59:59.000+0000").time)
        assertThat(Adapters.parseUtcTime("491231235959Z"))
          .isEqualTo(date("2049-12-31T23:59:59.000+0000").time)
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CookieTest.kt

      }
    
      @Test fun expiresDate() {
        assertThat(Date(parse(url, "a=b; Expires=Thu, 01 Jan 1970 00:00:00 GMT")!!.expiresAt))
          .isEqualTo(date("1970-01-01T00:00:00.000+0000"))
        assertThat(Date(parse(url, "a=b; Expires=Wed, 09 Jun 2021 10:18:14 GMT")!!.expiresAt))
          .isEqualTo(date("2021-06-09T10:18:14.000+0000"))
        assertThat(Date(parse(url, "a=b; Expires=Sun, 06 Nov 1994 08:49:37 GMT")!!.expiresAt))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 24.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/HeadersJvmTest.kt

            .byteCount(),
        ).isEqualTo(20L)
      }
    
      @Test fun addDate() {
        val expected = Date(0L)
        val headers =
          Headers.Builder()
            .add("testDate", expected)
            .build()
        assertThat(headers["testDate"]).isEqualTo("Thu, 01 Jan 1970 00:00:00 GMT")
        assertThat(headers.getDate("testDate")).isEqualTo(Date(0L))
      }
    
      @Test fun addInstant() {
        val expected = Instant.ofEpochMilli(0L)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Cookie.kt

              } else {
                Long.MAX_VALUE
              }
            expiresAt = currentTimeMillis + deltaMilliseconds
            if (expiresAt < currentTimeMillis || expiresAt > MAX_DATE) {
              expiresAt = MAX_DATE // Handle overflow & limit the date range.
            }
          }
    
          // If the domain is present, it must domain match. Otherwise we have a host-only cookie.
          val urlHost = url.host
          if (domain == null) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

      /**
       * @param delta the offset from the current date to use. Negative values yield dates in the past;
       *     positive values yield dates in the future.
       */
      private fun formatDate(
        delta: Long,
        timeUnit: TimeUnit,
      ): String? {
        return formatDate(Date(System.currentTimeMillis() + timeUnit.toMillis(delta)))
      }
    
      private fun formatDate(date: Date): String? {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/HeadersKotlinTest.kt

     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.containsExactly
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNull
    import java.time.Instant
    import java.util.Date
    import okhttp3.Headers.Companion.headersOf
    import org.junit.jupiter.api.Test
    
    class HeadersKotlinTest {
      @Test fun getOperator() {
        val headers = headersOf("a", "b", "c", "d")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Dec 21 01:54:49 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

            timeZone = utc
            set2DigitYearStart(Date(-631152000000L)) // 1950-01-01T00:00:00Z.
          }
    
        try {
          val parsed = dateFormat.parse(string)
          return parsed.time
        } catch (e: ParseException) {
          throw ProtocolException("Failed to parse UTCTime $string")
        }
      }
    
      internal fun formatUtcTime(date: Long): String {
        val utc = TimeZone.getTimeZone("GMT")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  8. README.md

    OkHttp depends on [Okio][okio] for high-performance I/O and the [Kotlin standard library][kotlin]. Both are small libraries with strong backward-compatibility.
    
    We highly recommend you keep OkHttp up-to-date. As with auto-updating web browsers, staying current
    with HTTPS clients is an important defense against potential security problems. [We
    track][tls_history] the dynamic TLS ecosystem and adjust OkHttp to improve connectivity and
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun headers() {
        var headers: Headers = headersOf("", "")
        headers = mapOf("" to "").toHeaders()
        val get: String? = headers[""]
        val date: Date? = headers.getDate("")
        val instant: Instant? = headers.getInstant("")
        val size: Int = headers.size
        val name: String = headers.name(0)
        val value: String = headers.value(0)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun ntripr1() {
        server.enqueue(
          MockResponse.Builder()
            .status("SOURCETABLE 200 OK")
            .addHeader("Server: NTRIP Caster 1.5.5/1.0")
            .addHeader("Date: 23/Jan/2004:08:54:59 UTC")
            .addHeader("Content-Type: text/plain")
            .body("STR;FFMJ2;Frankfurt;RTCM 2.1;1(1),3(19),16(59);0;GPS;GREF;DEU;50.12;8.68;0;1;GPSNet V2.10;none;N;N;560;Demo\nENDSOURCETABLE")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
Back to top