summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2023-09-08 14:25:00 +0200
committerGitHub <noreply@github.com>2023-09-08 14:25:00 +0200
commit3a679844e499df026be7d5b3a9e80e5bf3ad585a (patch)
tree1256c658e1bff5e3ddce1cce50cddd338e8d27ab /lib
parente9b528eaee834221e1740b029260b35fe80d673b (diff)
Fix `account_id`, `max_id` and `min_id` params not working in search (#26847)
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/snowflake.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mastodon/snowflake.rb b/lib/mastodon/snowflake.rb
index 8b79541da27..0a596b29401 100644
--- a/lib/mastodon/snowflake.rb
+++ b/lib/mastodon/snowflake.rb
@@ -104,6 +104,10 @@ module Mastodon::Snowflake
id
end
+ def to_time(id)
+ Time.at((id >> 16) / 1000).utc
+ end
+
private
def already_defined?