Skip to content

Commit ecaf1ae

Browse files
authored
Merge pull request #17821 from wordpress-mobile/fix/site-creation-timezone
Create sites with user's timezone
2 parents 54ebfd8 + 6afa0e6 commit ecaf1ae

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def wordpress_ui
4747
end
4848

4949
def wordpress_kit
50-
pod 'WordPressKit', '~> 4.47.0-beta.1'
50+
pod 'WordPressKit', '~> 4.47.0-beta.4'
5151
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :tag => ''
5252
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => ''
5353
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''

Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ PODS:
463463
- WordPressKit (~> 4.18-beta)
464464
- WordPressShared (~> 1.12-beta)
465465
- WordPressUI (~> 1.7-beta)
466-
- WordPressKit (4.47.0-beta.1):
466+
- WordPressKit (4.47.0-beta.4):
467467
- Alamofire (~> 4.8.0)
468468
- CocoaLumberjack (~> 3.4)
469469
- NSObject-SafeExpectations (= 0.0.4)
@@ -567,7 +567,7 @@ DEPENDENCIES:
567567
- SVProgressHUD (= 2.2.5)
568568
- WordPress-Editor-iOS (~> 1.19.7)
569569
- WordPressAuthenticator (~> 1.43.0)
570-
- WordPressKit (~> 4.47.0-beta.1)
570+
- WordPressKit (~> 4.47.0-beta.4)
571571
- WordPressMocks (~> 0.0.15)
572572
- WordPressShared (~> 1.17.1-beta.1)
573573
- WordPressUI (~> 1.12.3)
@@ -579,6 +579,7 @@ DEPENDENCIES:
579579
SPEC REPOS:
580580
https://github.com/wordpress-mobile/cocoapods-specs.git:
581581
- WordPressAuthenticator
582+
- WordPressKit
582583
- WordPressShared
583584
trunk:
584585
- Alamofire
@@ -618,7 +619,6 @@ SPEC REPOS:
618619
- UIDeviceIdentifier
619620
- WordPress-Aztec-iOS
620621
- WordPress-Editor-iOS
621-
- WordPressKit
622622
- WordPressMocks
623623
- WordPressUI
624624
- WPMediaPicker
@@ -831,7 +831,7 @@ SPEC CHECKSUMS:
831831
WordPress-Aztec-iOS: 144f124148079084860368dfd27cb96e0952853e
832832
WordPress-Editor-iOS: 20551d5a5e51f29832064f08faaaae8e1da7e1e2
833833
WordPressAuthenticator: e4a43745a647e4dc4b35d21b1353bc4f07f9f3c9
834-
WordPressKit: 375f54b3b27bf37f8fc5ed444afd0507fe48a2c7
834+
WordPressKit: 99ce7f470aff4a4acf518ac25efd6eb4ad9df996
835835
WordPressMocks: 6b52b0764d9939408151367dd9c6e8a910877f4d
836836
WordPressShared: bc50e38a31e05134a7c643cef9cf6a7e28e9cf34
837837
WordPressUI: 45591178e843ecb82e65e868ec766148befe9f9f
@@ -847,6 +847,6 @@ SPEC CHECKSUMS:
847847
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
848848
ZIPFoundation: e27423c004a5a1410c15933407747374e7c6cb6e
849849

850-
PODFILE CHECKSUM: e1bae5eba8242d51ef4f40a8ad0becb6dac3ecf0
850+
PODFILE CHECKSUM: 170c48b8696fe92513a66f9606289e0062e520ab
851851

852852
COCOAPODS: 1.11.2

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
19.2
22
-----
3+
* [*] Site creation: Fixed bug where sites created within the app were not given the correct time zone, leading to post scheduling issues. [#17821]
34
* [*] Block editor: Replacing the media for an image set as featured prompts to update the featured image [https://github.com/wordpress-mobile/gutenberg-mobile/pull/3930]
45
* [**] Some of the screens of the app has a new, fresh and more modern visual, including the initial one: My Site. [#17812]
56
* [**] Notifications: added a button to mark all notifications in the selected filter as read. [#17840]

WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/SiteCreationRequest+Validation.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extension SiteCreationRequest {
88

99
// MARK: Unvalidated
1010

11-
/// Convenience initializer, which applies sensible defaults for language ID, client ID & client secret.
11+
/// Convenience initializer, which applies sensible defaults for language ID, client ID, client secret and timezone.
1212
/// The request is marked as pending validation.
1313
///
1414
/// - Parameters:
@@ -38,7 +38,8 @@ extension SiteCreationRequest {
3838
languageIdentifier: WordPressComLanguageDatabase().deviceLanguageIdNumber().stringValue,
3939
shouldValidate: true,
4040
clientIdentifier: ApiCredentials.client,
41-
clientSecret: ApiCredentials.secret
41+
clientSecret: ApiCredentials.secret,
42+
timezoneIdentifier: TimeZone.autoupdatingCurrent.identifier
4243
)
4344
}
4445

@@ -59,7 +60,8 @@ extension SiteCreationRequest {
5960
languageIdentifier: request.languageIdentifier,
6061
shouldValidate: false,
6162
clientIdentifier: request.clientIdentifier,
62-
clientSecret: request.clientSecret
63+
clientSecret: request.clientSecret,
64+
timezoneIdentifier: request.timezoneIdentifier
6365
)
6466
}
6567
}

0 commit comments

Comments
 (0)