Insource Systems
  • Intro
  • Change Log
  • API Reference
  • Insource Bot
    • Getting Started
    • Commands
      • Settings
      • Moderation
      • Info
      • Account
      • InStore
  • InStore
    • Getting Started
      • Linking Your Account
      • Create Your Store
      • Create a Product
    • Framework
      • RemoteEvent
        • Alert
        • LaunchProduct
      • RemoteFunction
        • GetCurrentUser
        • GetProductById
        • GetProducts
        • RequestPromptPurchase
      • Resources
        • Configuration
        • Product
        • Theme
        • User
      • Utils
        • TeleportToAccount
        • TimeStringToEpoch
    • API Resources
      • License
      • Product
      • Store
  • API Resources
    • User
Powered by GitBook
On this page

Was this helpful?

  1. InStore
  2. Framework
  3. Utils

TimeStringToEpoch

InStore util to convert an ISO8601 timestamp to integer epoch time.

PreviousTeleportToAccountNextAPI Resources

Last updated 1 year ago

Was this helpful?

Utils.TimeStringToEpoch

function (iso_string)

Get the epoch timestamp integer from an string timestamp. Returns an integer representing epoch time.

Arguments

Field
Type
Description

iso_string

string

ISO8601 string timestamp to convert

Example Script

local RS = game.ReplicatedStorage:WaitForChild('InStore');
local TimeStringToEpoch = require(RS.Utils.TimeStringToEpoch);

print(TimeStringToEpoch('1970-01-01T00:00:00Z')); --> 0
ISO8601