How to set values within the sys property?
See original GitHub issueI want to set the creation date of an entry as I am importing from another CMS.
Everything works great except that my values for sys.createdAt
are ignored.
My code:
contentfulNews = await environment.createEntryWithId(
'blogPost',
newsEntry.id,
{
sys: {
createdAt: newsEntry.created,
},
fields,
}
)
Anything I need to do to be able to alter sys.createdAt? I tried to pass a string and a JS-Date object. Both didn’t work.
Thanks a lot, Benedikt
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to set system property? - java - Stack Overflow
You can do this via a couple ways. One is when you run your application, you can pass it a flag. java -Dgate.home="http://gate.ac.uk/wiki/code-repository" ......
Read more >Java System Properties - HowToDoInJava
Java maintains a set of system properties for its operations. You can get all the system properties via System.getProperties() or you can ...
Read more >System Properties - Essential Java Classes
Writing System Properties ... To modify the existing set of system properties, use System.setProperties . This method takes a Properties object that has...
Read more >How to Specify a java.lang.system Property - IBM
To set a system property dynamically, call the java.lang.System.setProperty method in your code substituting the appropriate property name and value:
Read more >How do I set System properties? - Web Tutorials - avajava.com
Programmatically, a system property can be set using the setProperty method of the System object, and also via the setProperty method of the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Will forward the feedback
Thanks!
@dlitvakb hey ho 😃 still around all the time, just as customer, not as employee 🙃
Yeah I see and this makes actually sense.
I will use a field now for publicationDate, this also allows my editors later on to change the field as it will order the blog posts.
Just one thing:
Can you state in the management docs website, that this is api generated metadata and can not be changed? As mentioned above, I think the one sentence is misleading.