Skip to content

Commit

Permalink
[Bugfix] Added support for locale in the timestamp (#125)
Browse files Browse the repository at this point in the history
* Added locale support in NSDateFormatter

* Bumped version to `1.5.3`

* Changed timezone initialisation
  • Loading branch information
1abhishekpandey committed Apr 7, 2022
1 parent d875bb1 commit 97c8ba5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ All notable changes to this project will be documented in this file.
## Version - 1.5.2 - 2022-02-16
### Fix
- Thread issue

## Version - 1.5.3 - 2022-03-07
### Fix
- Improper timestamp issue
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PODS:
- nanopb/encode (1.30906.0)
- PromisesObjC (1.2.12)
- Protobuf (3.19.1)
- Rudder (1.5.2)
- Rudder (1.5.3)

DEPENDENCIES:
- Firebase/Analytics
Expand Down Expand Up @@ -120,8 +120,8 @@ SPEC CHECKSUMS:
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
Protobuf: 3724efa50cb2846d7ccebc8691c574e85fd74471
Rudder: 557cc105d77f365821d78403b1abacfd2e3018de
Rudder: 600311814a186067b0c3d996b83342bb0b2a43e7

PODFILE CHECKSUM: 33b0e9f1b94a028aa8a3b4aecf718a44c9b6265e

COCOAPODS: 1.11.2
COCOAPODS: 1.11.3
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ The iOS SDK is available through [**CocoaPods**](https://cocoapods.org), [**Cart
To install the SDK, simply add the following line to your Podfile:

```xcode
pod 'Rudder', '1.5.2'
pod 'Rudder', '1.5.3'
```

### Carthage

For Carthage support, add the following line to your `Cartfile`:

```xcode
github "rudderlabs/rudder-sdk-ios" "v1.5.2"
github "rudderlabs/rudder-sdk-ios" "v1.5.3"
```

> Remember to include the following code in all `.m` and `.h` files where you want to refer to or use the RudderStack SDK classes, as shown:
Expand All @@ -71,7 +71,7 @@ You can also add the RudderStack iOS SDK via Swift Package Mangaer, via one of t

* Enter the package repository (`git@github.com:rudderlabs/rudder-sdk-ios.git`) in the search bar.

* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.5.2` as the value, as shown:
* In **Dependency Rule**, select **Up to Next Major Version** and enter `1.5.3` as the value, as shown:

![Setting dependency](https://user-images.githubusercontent.com/59817155/145574696-8c849749-13e0-40d5-aacb-3fccb5c8e67d.png)

Expand Down Expand Up @@ -99,7 +99,7 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "git@github.com:rudderlabs/rudder-sdk-ios.git", from: "1.5.2")
.package(url: "git@github.com:rudderlabs/rudder-sdk-ios.git", from: "1.5.3")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
2 changes: 1 addition & 1 deletion Rudder.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Rudder'
s.version = "1.5.2"
s.version = "1.5.3"
s.summary = "Privacy and Security focused Segment-alternative. iOS ,tvOS and watchOS SDK"
s.description = <<-DESC
Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly.
Expand Down
4 changes: 2 additions & 2 deletions Rudder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.5.2;
MARKETING_VERSION = 1.5.3;
PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.Rudder;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1055,7 +1055,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.5.2;
MARKETING_VERSION = 1.5.3;
PRODUCT_BUNDLE_IDENTIFIER = com.rudderstack.Rudder;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Classes/RSConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ @implementation RSConstants
bool const RSTrackLifeCycleEvents = YES;
bool const RSRecordScreenViews = NO;
bool const RSEnableBackgroundMode = NO;
NSString *const RS_VERSION = @"1.5.2";
NSString *const RS_VERSION = @"1.5.3";
NSString* const DISABLE = @"disable";
NSString* const WHITELISTED_EVENTS = @"whitelistedEvents";
NSString* const BLACKLISTED_EVENTS = @"blacklistedEvents";
Expand Down
3 changes: 2 additions & 1 deletion Sources/Classes/RSUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ @implementation RSUtils

+ (NSString*) getDateString:(NSDate *)date {
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.timeZone = [[NSTimeZone alloc] initWithName:@"UTC"];
dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
dateFormatter.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
return [dateFormatter stringFromDate:date];
}
Expand Down

0 comments on commit 97c8ba5

Please sign in to comment.