Skip to content

Instantly share code, notes, and snippets.

@JimmyCushnie
Created August 17, 2021 13:53
Show Gist options
  • Save JimmyCushnie/8014fd79703d21a7afd0dac4f9956fff to your computer and use it in GitHub Desktop.
Save JimmyCushnie/8014fd79703d21a7afd0dac4f9956fff to your computer and use it in GitHub Desktop.
Extract a timestamp from a TikTok ID.
class Program
{
static void Main()
{
Console.WriteLine("Enter tiktok ID");
ulong id = ulong.Parse(Console.ReadLine());
ulong shifted = id >> 32;
var date = DateTime.UnixEpoch.AddSeconds(shifted);
Console.WriteLine("Tiktok was posted on " + date);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment