Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8516797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:31:52+00:00 2026-06-11T05:31:52+00:00

I am inserting files into Google Drive through the API on Android. Any file

  • 0

I am inserting files into Google Drive through the API on Android.
Any file that is uploaded takes on the modified time of when it as uploaded, not the original file modified time. If I upload something through the Google Drive App on my desktop, the original modified time of the file is kept.

I have tried using the setModifiedDate() method in the File object, but it doesn’t seem to work OR i’m sending the wrong date format possibly? I have tried both of these formats:

2012-08-09T05:34:36-07:00
2012-08-09T05:34:36-0700

Neither seemed to work. Is there an easier way to have it retain the original modified time of the file without having to set it manually (which I can’t get to work anyhow)?

The code i am using is the same as the example here: https://developers.google.com/drive/v2/reference/files/insert

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:31:53+00:00Added an answer on June 11, 2026 at 5:31 am

    I’ll answer my own question here.

    It turns out I just needed to use setModifiedDate() (which I was already doing) but I needed to NOT set a description using setDescription(). I am not sure if there is a limitation or a bug, but as soon as I removed the description I was setting, then the date I was setting with setModifiedDate() started to work.

    I also confirmed the same behaviour with the API Explorer here: https://developers.google.com/drive/v2/reference/files/insert

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I heard a rumor that when inserting binary data (files and such) into MySQL,
Scenerio: I'm inserting a CSV file into my database. I'm using jdbc driver to
i am successfully inserting images into my jar file but all images go to
I'm running into a problem inserting rows from a file with 13,000 rows into
I am inserting metadata into postscript files with a program, to be distilled to
I am reading in some raw files and inserting them into a DB. This
My problem stems from Emacs inserting the coding system headers into source files containing
I need help inserting xml files into SQL Server 2008. I have the following
Okay so I am running into issues inserting a file into my database as
Has anyone had problems inserting a PNG file into a word document, using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.