Skip to content

Commit 39aed33

Browse files
committed
Use NSDate instead of c func time to get timestamp
Otherwise sometimes the pod does not compile, as discussed in issue pusher#133
1 parent 27b77dd commit 39aed33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/PTPusherAPI.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ - (void)triggerEvent:(NSString *)eventName onChannel:(NSString *)channelName dat
4242

4343
queryParameters[@"body_md5"] = [[bodyString MD5Hash] lowercaseString];
4444
queryParameters[@"auth_key"] = key;
45-
queryParameters[@"auth_timestamp"] = @((double)time(NULL));
45+
queryParameters[@"auth_timestamp"] = @([[NSDate date] timeIntervalSince1970]);
4646
queryParameters[@"auth_version"] = @"1.0";
4747
queryParameters[@"name"] = eventName;
4848

0 commit comments

Comments
 (0)