如何修改Photos应用中「时刻」的默认日期格式?
Great question—this is a super common frustration for folks who’ve stuck with Photos through multiple versions, especially when old library data doesn’t play nice with new defaults! Let’s break this down into two parts: updating your existing Moments to a new date format, and setting the default format for future imports.
Photos doesn’t have a built-in bulk edit tool for Moment titles, but you have two reliable options:
Option 1: Use AppleScript (Customizable, Precise)
This lets you define exactly the date format you want and apply it to every Moment in your library. Here’s how:
- Open the Script Editor app (found in Applications > Utilities).
- Paste this script, then tweak the date format string to match your preferred style:
tell application "Photos" set allMoments to every moment repeat with aMoment in allMoments set momentStartDate to start date of aMoment -- Replace the format string below with your desired pattern: -- Examples: -- '%Y-%m-%d' = 2024-10-05 -- '%B %d, %Y' = October 05, 2024 -- '%Y年%m月%d日' = 2024年10月05日 set newMomentTitle to do shell script "date -j -f '%Y-%m-%d' '" & (date string of momentStartDate) & "' +'%B %d, %Y'" set name of aMoment to newMomentTitle end repeat end tell
- Before running, go to System Settings > Privacy & Security > Files and Folders and make sure Script Editor has permission to access Photos.
- Click the run button (▶️) in Script Editor. Wait for it to finish—this might take a minute if you have a large library.
Pro tip: Back up your Photos library first (right-click the library in Finder > Duplicate) just in case something goes sideways.
Option 2: Tweak System Region Settings (Quick, But Global)
If you want all Moments to match your system’s default date format, you can update your region settings, then force Photos to refresh:
- Open System Settings > General > Language & Region.
- Click Date Format > Customize and adjust the Short Date format to your preference.
- Quit and re-open Photos. Some older Moments might update automatically, but this isn’t guaranteed for all legacy data—you might still need the AppleScript for full coverage.
For any new photos/videos you import going forward, Photos uses your system’s Short Date format by default. To lock this in:
- Follow the same steps above for System Settings > General > Language & Region > Date Format > Customize.
- Set your preferred Short Date format, and all future Moments will automatically use this style. No extra steps needed!
Note: Changing the system date format will affect other apps (like Calendar, Mail, etc.) that pull date display settings from your system. If you only want Photos to use a specific format, stick with the AppleScript method for existing Moments and leave system settings as-is.
内容的提问来源于stack exchange,提问作者Ramy

