1. Setup
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Setup

Timezones

Stripe stores every timestamp as a Unix epoch, which is UTC by definition. StripeKit always does the conversion in two explicit steps, never one:
1.
Normalize to UTC. The raw Unix timestamp is converted into an ISO-8601 UTC string. This is always available as the ...Utc field, for example currentPeriodEndUtc, issuedAtUtc, paidAtUtc.
2.
Convert to your configured timezone. If you set a timezone on init, anything other than "UTC", the default, that UTC value is converted once more into your chosen timezone and exposed as the matching ...Local field, for example currentPeriodEndLocal.
If you don't set a timezone, both fields are UTC, and no double conversion happens.

Helpers#

The timezone conversion logic is also exported directly, in case you need it outside the normalized records:
Previous
Configuration
Next
Storage Adapter
Built with