apple_timestamp.js 311 B

12345678
  1. module.exports = {
  2. parse: (field_name) => {
  3. return `CASE WHEN (${field_name} > 1000000000) THEN datetime(${field_name} / 1000000000 + 978307200, 'unixepoch')
  4. WHEN ${field_name} <> 0 THEN datetime((${field_name} + 978307200), 'unixepoch')
  5. ELSE ${field_name} END`
  6. }
  7. }